Package org.jboss.as.test.integration.jpa.hibernate.entity

Examples of org.jboss.as.test.integration.jpa.hibernate.entity.Ticket


    @PersistenceContext(unitName = "entity_pc", type = PersistenceContextType.EXTENDED)
    private Session session;

    public Customer oneToManyCreate() throws Exception {
        Ticket t = new Ticket();
        t.setNumber("111");

        Customer c = new Customer();
        Set<Ticket> tickets = new HashSet<Ticket>();

        tickets.add(t);
        t.setCustomer(c);
        c.setTickets(tickets);

        session.save(c);

        return c;
View Full Code Here

TOP

Related Classes of org.jboss.as.test.integration.jpa.hibernate.entity.Ticket

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.