3 Replies Latest reply on Mar 29, 2013 9:21 AM by Adam Warski

    ObjectNotFoundException when merging entity

    Jose Cisneros Newbie

      I am having an issue when merging an Entity object that has a set of EntityLinks that represent a many to many mapping.  I'm getting a ObjectNotFoundException: No row with the given identifier exists: [EntityLink#id]. when trying to merge the Entity object. The object I am trying to merge is detached and I am inserting a new EntityLink object into its collection.  Before inserting the object I save EntityLink object.


      I have tried enabling the Hibernates log to see the SQL queries, and I don't see anywhere a select statement to load by id the EntiyLink when doing the merge.


      I would appreciate if you could point me in the right direction to solve this problem.