Metamodel Attribute NOT EQUALS to same Attribute in a different EntityManager

#1

Attribute from Metamodel initialized on @PostConstruct event IS NOT EQUALS of the same Attribute from Metamodel of a differente EntityManager initialized on a @Controller @RequestMapping event.

I am testing one application over Spring Web MVC and I can not post one Simple Test Case.

The problem is it: If I have two moments of initialization of "javax.persistence.metamodel" from EntityManager and these two metamodels come from different EntityManagers. One of these is on a @PostConstruct event and the other on a @Controller @RequestMapping event, they return not equals Attributes using the same entity.

 

sameAttributeOnPostConstruct.equals(sameAttributeOnController) //is false

 

#2

Build 2.5.7_01 adds an equals implementation to Metamodel attributes that may solve this.

ObjectDB Support
#3

Very thank you my friend! yessmiley

Reply