Package org.apache.openjpa.persistence.jdbc.query.domain

Examples of org.apache.openjpa.persistence.jdbc.query.domain.Customer


    int nCustomer = 20;
    int nOrder    = 10;
    EntityManager em = emf.createEntityManager();
    em.getTransaction().begin();
    for (int j = 0; j < nCustomer; j++) {
      Customer customer = new Customer();
      customer.setName("Customer-" + j);
      for (int k = 0; k < nOrder; k++) {
        Order order = new Order();
        order.setAmount(100);
        customer.addOrder(order);
        em.persist(order);
      }
      em.persist(customer);
    }
    em.getTransaction().commit();
View Full Code Here


    int nCustomer = 20;
    int nOrder    = 10;
    EntityManager em = emf.createEntityManager();
    em.getTransaction().begin();
    for (int j = 0; j < nCustomer; j++) {
      Customer customer = new Customer();
      customer.setName("Customer-" + j);
      for (int k = 0; k < nOrder; k++) {
        Order order = new Order();
        order.setAmount(100);
        customer.addOrder(order);
        em.persist(order);
      }
      em.persist(customer);
    }
    em.getTransaction().commit();
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.jdbc.query.domain.Customer

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.