To use JPA 2.1 features, I've been trying to upgrade the Hibernate suite from 4.2.6 to 4.3.0. The application throws an exception when it starts. Apparently while analyzing the entity model - not while creating the database:
any types do not have a unique referenced persister
It relates to an association annotated with @Any. I'm pretty sure I've followed the example of the documentation. Moreover it all works with 4.2.6. So maybe the semantics of @Any were changed, but the documentation wasn't yet updated ? Is it a corner case ?
The embeddable class
For convenience I've put it into an embeddable. Otherwise sooner or later somebody will make a typo in the annotations.
The stack trace
I'm putting all the details into SO at:
JDK 1.6.0_43, Linux Debian Wheezy x64.
One year has passed !
Anyone any idea ?
Does this happen only when an @Any is in an @Embeddable?
Please create a pull request with an additional test to org.hibernate.test.annotations.any.AnyTest that reproduces your issue and the proposed fix.
I'll have to investigate. But being not well versed in the deep Hibernate stuff it might take some time...
But it would already help me if I knew what the error message precisely means.
I've had another go at the problem - but still no luck.
Did you manage to solve it ?
Bulk-rejecting tickets that did not include a test case or additional details.