]
Andrey Vlasov updated HHH-7203:
-------------------------------
Attachment: hhh-7203.patch
Patch for 3.6.11-SNAPSHOT.
IdentityGenerator fails with JOINED Inheritance when inserting entity
to PosgtreSQL
-----------------------------------------------------------------------------------
Key: HHH-7203
URL:
https://hibernate.onjira.com/browse/HHH-7203
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 3.6.10
Environment: Hibernate 3.6.10, PostgreSQL 9.1-901.jdbc4
Reporter: Andrey Vlasov
Attachments: hhh-7203.patch, hibernate-postgreSQL-bug-HHH-7203.zip
We have inheritance strategy JOIN in table. Now we want to insert some entity inheriting
from this one, and we want PostgreSQL to automatically generate the ID for the new
entity.
Hibernate runs IdentityGenerator.GetGeneratedKeysDelegate.executeAndExtract(), which uses
"persister.getIdentifierColumnNames()[0]" as identifierColumnName (in Hibernate
3.6.10 it's line 99 in IdentityGenerator) to getGeneratedIdentity.
This identifierColumnName points actually to the child entity identifierColumn. So, this
inserting to the parent table fails on getting identifier by wrong column name (a column
from the child entity).
This issue is a result of HHH-6580 changes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: