Suppose we have following entities:
Persisting these fails with:
This bug still exist in version 5.2.17.
I have the same error with HSQLDB when running my tests.
The ID is generated using a SEQUENCE.
Quick sample project to show case the bug with a composite key and a part of it should be generated.
Was test using the latest version of Hibernate 5.4.0.CR2.
Changing the @GeneratedValue from SEQUENCE to IDENDITY still make the same error.
Tracked this down, it was caused by HHH-4848 on Wed Feb 3 06:58:46 2010 +0000
The check used to skip null values with a continue, but was changed to throw an exception. As such HHH-10956 is a regression caused by HHH-4848
This is the (relevant) commit log for the offending file
HHH-11274 - EntityManagerFactoryImpl.getIdentifier uses deprecated version of getIdentifier
HHH-10664 - Prep 6.0 feature branch - merge hibernate-entitymanager into hibernate-core (first sucessful full compile of consolidated hibernate-core)
HHH-9803 - Checkstyle fix ups
HHH-8741 - More checkstyle cleanups
HHH-6026 - Migrate bytecode provider integrations to api/spi/internal split
HHH-4704 - Pass session into EntityTuplizer#setIdentifier
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18733 1b8cb986-b30d-0410-93ca-fae66ebed9b2
HHH-4848 - Derived identities: Derived entities using @IdClass and mapping a @XToOne are not supported
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18698 1b8cb986-b30d-0410-93ca-fae66ebed9b2
back-ported 5.2.x pull request