equality « Test « JPA Q&A





1. Test two PersistenceContexts for equality    stackoverflow.com

Is there a way to check if two EntityManagers instances represents the same PersistenceContext? The container can use a proxy for implementation of the EntityManager, so I don't think that checking the ...

2. NB tutorial: JPQL query equality test (field value = object?)    forums.netbeans.org

Why is it valid to compare p.category (int in the category field) to the parameter category (a Category object)? To oversimplify, one is an INT field value in a column and the other is an entire row in the table. Is this just a comparison that the persistence unit "takes care of"? If so, how? Thanks in advance.

3. Hash Caching Value Equality Testing in Mutable Objects    forum.hibernate.org

Newbie Joined: Tue Nov 02, 2010 4:29 am Posts: 10 We are writing a content management system that stores objects of class or sulclass Content. Some of the applications actions has the potential to produce new content that has an identical VALUE to pre-existing content. We want to catch this and flag the new content as a duplicate and deal with ...