Reverse engineer one-to-one

Description

Hello, I'm using the latest development milestone of hibernate tools 3.4.0.v20110915-1559-H24-M3.

I am trying to reverse egineer the tables defined in the attached creeation sql file using the attached reveng file.

Table parent has just an id column.
Tables child and child2 have an id column and an unique parent_id column which references the parent.id.

If I try to reverse engineer the parent with 2 child tables, I get an exception saying that parent table class does not exist.

org.test.hibernate.MappingException: An association from the table child refers to an unmapped class: ee.hibernate.reveng.generated.Parent
An association from the table child refers to an unmapped class: ee.test.hibernate.reveng.generated.Parent
<No message>

If try to reverse engineer the parent with only 1 child, it succeeds.

Environment

eclipse indigo 64bit, postgresql 9.1 64bit, java 6 64bit, windows 7 64bit

Attachments

3

Activity

Show:

Koen AersDecember 10, 2024 at 3:06 PM

I am closing this issue as it did not have any relevant updates since 2011. Please feel free to reopen it if you think it is still relevant.

ErkiSeptember 26, 2011 at 7:58 AM

Perhaps I should have added the foreign key mappings to child tables?

If I add the foregin keys to the child table mapping, I dont get any child references in the generated parent table class.

Won't Fix

Details

Assignee

Reporter

Labels

Bug 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

Erki
Koen Aers

Components

Fix versions

Priority

Created September 24, 2011 at 8:02 PM
Updated December 10, 2024 at 3:06 PM
Resolved December 10, 2024 at 3:06 PM