Entity Manager has a semantic difference between Merge and Persist, however, I notice that the base Data dao just has a "save" method. Does that correspond to the Merge, or is there code that intelligently checks with an exist call and persist if the call returns false?
edit: The reason I ask is that it looks like I may have run into a hibernate issue with OneToMany and deleteOrphan=true. On a merge(which is mapped to EntityManager.merge) Hibernate seems to issue an update setting the join column to null first, before deleting it. On a saveOrUpdate, (mapped to EntityManager.persist) Hibernate does the right thing and issue the delete straightaway...
Jeff


Reply With Quote