Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EntityManager interface persist Method

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi , the below is a coding that will be responsible to persist the Customer Entity to the DataBase.




Can anybody please tell me How EntityManager Persist method is working as em is not initialized.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry i didn't see the @PersistenceContext annotation. which is doing all the actions here behind the scenes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic