[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HHH-7203) IdentityGenerator fails with JOINED Inheritance when inserting entity to PosgtreSQL
Andrey Vlasov (JIRA)
noreply at atlassian.com
Tue Apr 3 02:38:48 EDT 2012
[ https://hibernate.onjira.com/browse/HHH-7203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46151#comment-46151 ]
Andrey Vlasov edited comment on HHH-7203 at 4/3/12 1:37 AM:
------------------------------------------------------------
Test case for the issue. Just unzip and mvn test.
was (Author: avlasov):
testcase
> 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: 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: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list