@PrimaryKeyJoinColumn and @ForeignKey(name = "FOREIGN_FOOBAR") don't work
for InheritanceType.JOINED
----------------------------------------------------------------------------------------------------
Key: HCANN-24
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HCANN-24
Project: Hibernate Commons Annotations
Issue Type: Bug
Affects Versions: 3.2.0
Environment: dialect: Oracle10g
Reporter: Marcin Cinik
Attachments: jpr.zip, schema2.ddl
I've got an example where I have two classes: Customer, ValuedCustomer, where
ValuedCustomer inherits from Customer. As InheritanceType.JOINED is used here, hibernate
will generate a primary key in ValuedCustomer as well as all integrity constraints for
that (I use Oracle10g dialect). I would like to give a name to that foreign key in
ValuedCustomer (which is also a primary key there), but it's not possible.
In ValuedCustomer I use @PrimaryKeyJoinColumn annotation and
@org.hibernate.annotations.Table with foreignKey property set in it. I would like that
hibernate hbm2ddl generate foreign key constraint name as indicated in @ForeignKey
annotation but it doesn't. It generates random constraint name instead.
I'm attaching example java project and generated schema file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira