I have an entity with the following 2 attributes (among others):
This definition works in java 6. The same code and hibernate libraries on java 8 fail during construction of the sessionFactory with the following error:
It states the entity Insuredperson does not exist. However, if I remove the @Generated annotation from the insuredperson attribute, the sessionFactory is constructed without problems on java 8.
I've tested this behaviour with hibernate 5.1.14 and 5.1.15 but the results are the same for both versions.
hibernate-core:5.1.14, Oracle 11g Database, Windows 7 x64, WebLogic Servers 10.3.6.0 (JDK 1.6.0_45), 184.108.40.206.0 (JDK 1.8.0_152), Spring Framework 4.3.18
Seems weird to say the least.
And you don't have a prior error which might explain the issue?
The only way we could understand what's going on would be if you created a test case using our test case template https://github.com/hibernate/hibernate-test-case-templates/tree/master/orm/hibernate-orm-5 .
There's no plan to release another 5.1.x though.
No, there is no prior error. If @Generated is there, it fails. If I remove the annotation, the session factory is created without errors.
As there is no plan to release another 5.1.x version, I woulld like to take the opportunity to upgrade to the latest hibernate version and see if the problem still exists.
were you able to test a more recent version and/or crate a test case? If not, we’ll close this.