Details
Assignee
UnassignedUnassignedReporter
Rui BaetaRui BaetaBug Testcase Reminder (view)
Bug reports should generally be accompanied by a test case!
Bug Testcase Reminder (edit)
Bug reports should generally be accompanied by a test case!
Participants
Rui BaetaComponents
Affects versions
Priority
Major
Details
Details
Assignee
Unassigned
UnassignedReporter
Rui Baeta
Rui BaetaBug Testcase Reminder (view)
Bug reports should generally be accompanied by a test case!
Bug Testcase Reminder (edit)
Bug reports should generally be accompanied by a test case!
Participants
Rui Baeta
Components
Affects versions
Priority
Created June 2, 2011 at 10:49 AM
Updated December 10, 2024 at 3:03 PM
In the reverse engineering process, Hibernate Tools is missing many-to-one relationships in which foreign key references a unique key in the one side.
Here is a test case: table
detail
has a foreign key to tablemaster
, and references a column that has a unique constraint (uk_master
).Now, when executing Hibernate Tools with
OracleMetaDataDialect
, this relationship is not captured by the metadata query issued byOracleMetaDataDialect
(constantSQL_FK_BASE
). This is so becauseOracleMetaDataDialect
is restricting foreign key relationships only to primary key constraints:If we change this restriction so that it includes also unique key constraints, it works:
As far as I know, this change doesn't have side effects.
There is a patch attached.
(If you need, I can zip a simple maven project with this test case.)