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.