Package de.mhus.lib.jpa

Examples of de.mhus.lib.jpa.JpaEntityManager.persist()


   
    em.begin();
   
    Book book1 = new Book();
    book1.setName("Oh wie schoen ist Panama");
    em.persist(book1);
   
    Book book2 = new Book();
    book2.setName("Sofies Welt");
    em.persist(book2);
   
View Full Code Here


    book1.setName("Oh wie schoen ist Panama");
    em.persist(book1);
   
    Book book2 = new Book();
    book2.setName("Sofies Welt");
    em.persist(book2);
   
    em.commit();
   
    System.out.println("ID: " + book1.getId() );
    System.out.println("ID: " + book2.getId() );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.