Bookmark Topic Watch Topic
  • New Topic

EntityManager.refresh() - Works on Detatched Or Managed Entities ?

 
Sandeep Vaid
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Report post to moderator
[P-298 Of EJB3 In Action Book] States: In the diagram, it shows that using a refresh method a detatched entity can become managed..
[P-332Of EJB3 In Action Book] States: The refresh method only works on managed entities...
Aren;t the above 2 statements contradictory? Moreover Statement1 is incorrect...
 
Leonardo Carreira
Ranch Hand
Posts: 489
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Sandeep Vaid..

As far as i know the EntityManager.refresh() used to get the last state of the entity.. (its mean that the Detatched entity will become Manage entity...)..

please correct me if i'm wrong..
i'm not teach you, i just tell you what i know..

Thanks..
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
Sandeep,

We have already asked you on earlier occasions, not to ask the same question in multiple forums. I am going to close this one. Let the discussion be continued in your other thread here http://www.coderanch.com/t/472072/Object-Relational-Mapping/java/EntityManager-refresh-works-only-managed
 
    Bookmark Topic Watch Topic
  • New Topic