1 Reply Latest reply on Dec 19, 2007 6:21 AM by pmuir

    safe way to test if entity is persisted

    gsegura

      Hello,
      in this topic http://www.jboss.com/index.html?module=bb&op=viewtopic&t=98478 the question of what is the proper (specification compliant) way to check if an entity has been persisted was raised.

      And here http://opensource.atlassian.com/projects/hibernate/browse/HHH-2439 is stated that

      checking non-null identifier value being available on an entity instance if its in persistent state

      is at least
      relying on questionable behavior


      but I didn't see any alternative approach suggested, so I'm asking for the safe way to verify persistent state of an entity.

      regards