[hibernate-issues] [Hibernate-JIRA] Created: (HBX-1200) hbm2ddl tool generates multiple foreign keys while mapping a collection of a class/ interface whose hierarchy is mapped using single_table strategy.

Luca Pedriali (JIRA) noreply at atlassian.com
Tue Mar 27 08:14:48 EDT 2012


hbm2ddl tool generates multiple foreign keys while mapping a collection of a class/ interface whose hierarchy is mapped using single_table strategy.
----------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HBX-1200
                 URL: https://hibernate.onjira.com/browse/HBX-1200
             Project: Hibernate Tools
          Issue Type: Bug
          Components: hbm2doc
         Environment: Hibernate version: 3.6.0.Final
Database: Oracle 10G
            Reporter: Luca Pedriali


Referring to this issue: https://hibernate.onjira.com/browse/HBX-494 , I found a similar problem. Mapping bidirectional ManyToOne relationships to classes of a single_table hierarchy, hbm2ddl generates multiple foreign keys of the same table.
For now the only solution is to manually delete the extra foreign keys. Moreover, the solution proposed in the quoted jira (use the foreign-key property) is not applicable for me, because I use hibernate tool with an ant task and my code use only the JPA annotations.

Appreciate if we could get a fix or workaround for the same.

--
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