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), 220.127.116.11.0 (JDK 1.8.0_152), Spring Framework 4.3.18