|
Mentioned ReflectHelper code is ^ and error is: org.hibernate.MappingException: In trying to locate getter for property [b1], Class [com.sun.ts.tests.jpa.core.entitytest.cascadeall.oneXone.A] defined both a get [public com.sun.ts.tests.jpa.core.entitytest.cascadeall.oneXone.B com.sun.ts.tests.jpa.core.entitytest.cascadeall.oneXone.A.getB1()] and is [public boolean com.sun.ts.tests.jpa.core.entitytest.cascadeall.oneXone.A.isB1()] variant The offending TCK source code is: @OneToOne(targetEntity = com.sun.ts.tests.jpa.core.entitytest.cascadeall.oneXone.B.class, mappedBy = "a1", orphanRemoval = true) protected B b1; public B getB1() { return b1; } public boolean isB1() { TestUtil.logTrace("isB1"); if (getB1() != null) TestUtil.logTrace("Relationship to B is not null..."); else TestUtil.logTrace("Relationship for B is null ..."); return getB1() != null; } Apologies for pasting all of the above but it helps me to see it all together as one comment. 🙂 From the above pasted code + error, I think the test would pass if both methods returned either B or boolean but is that only a Hibernate requirement or is that also Persistence Specification requirement? Could ReflectHelper be enhanced to handle ^ differently in JPA_COMPLIANCE mode? |