1 2 Previous Next 15 Replies Latest reply on May 6, 2007 3:53 AM by pmuir Go to original post
      • 15. Re: Problem with s:convertEntity
        pmuir

        I'm sure Christian can explain this better than me but my (poor) understanding is that:

        * If you get a persistent object twice from the same EntityManager, then it takes care of returning the same object. Thus, the default equals and hashcode work.

        * Equals and hashcode are *hard* to get right when using persistence (you need to use a natural id - not the pk) if you want Collections to work with detached objects.

        Therefore, as Seam's LRCs mean you (rarely) need to work with detached objects, you neatly avoid the equals/hashcode problem.

        1 2 Previous Next