I've faced the same issue described in @HHH-8858, and I believe I've found the reason.
I'm updating a legacy system from Hibernate 3.6.10 to 5.X. I tested both 4.3, 5.0, 5.1 and 5.2, and same error message: "any types do not have a unique referenced persister".
I tried the examples on the users guide, and they work. The only difference i, also in other issue record as well, my @Any annotation is inside an @Embedable class. When I removed the embeddable and move @Any definition directly to the object with @Entity, it works.
, this has been fixed for 5.1.17; it will also be fixed for the next 5.3 release.
Great, thanks @Gail Badner!
Fixed in 5.3 branch as well.
We tried moving to 5.3.x.
However, some deprecated API we were using have been removed from those versions.
So, we have to stick to 5.2.x (5.2.17) for some more time.
Is it possible to backport the fix to 5.2.17?
, unfortunately, we are no longer supporting 5.2, so there will not be any more releases in the 5.2 series.