@PersistenceContext private EntityManager entityManager; public void registerUser() { User usr = new User(); // Line 1 usr.setName("JavaChamp"); // Line 2 entityManager.persist(usr); // Line 3 }
private EntityManager entityManager;
public void registerUser() {
User usr = new User(); // Line 1
usr.setName("JavaChamp"); // Line 2
entityManager.persist(usr); // Line 3
}
Java Persistence API
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.