Register / Login
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
EJB and other Java EE Technologies
merge issue in EJB3.0
posted 9 years ago
If i would like to update the data using entitymanager.merge, do i need to first find the object by using em.find(xxx.class,id) and set the modified data to the retrieved object and then call em.merge(POJO).
Employee employee = em.find(Employee.class,"E1001");
what if i pass the updated POJO and without using em.find, if i directly use em.merge(POJO), will it be a problem?
Pls suggest which patten should i follow.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
Boost this thread!
Updated Objects Are Not Being Persisted
JPA 2.0 em.merge() firing select statements only (no update)
Using OneToOne as OneToMany
how to handle session in EJB
How do you update a collection if some exist and some are new?