[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7203) IdentityGenerator fails with JOINED Inheritance when inserting entity to PosgtreSQL

Andrey Vlasov (JIRA) noreply at atlassian.com
Wed Mar 28 12:34:48 EDT 2012


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


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: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list