Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
[b]Hibernate version: 3.05[/b]
[b]Mapping documents:[/b]
[b]Code between sessionFactory.openSession() and session.close():[/b]
[b]Full stack trace of any exception that occurs:[/b]
[b]Name and version of the database you are using:PointBase[/b]
[b]The generated SQL (show_sql=true):[/b]
[b]Debug level Hibernate log excerpt:[/b]
We use the mapping files to create the tables automatically. Unfortunately, hibernate does not create the right columns for the set mapping in the table.
The following is my mapping in the Device.hbm.xml:
<set name="addresses" cascade="none" lazy="true">
<key column="ADDRESS_ID"/>
<one-to-many class="Address"/>
</set>
<set name="serialIdentifiers" cascade="none" lazy="true">
<key column="SERIAL_IDENTIFIER_ID"/>
<one-to-many class="SerialIdentifier"/>
</set>
Hibernate does not create the foreign key "ADDRESS_ID" and SERIAL_IDENTIFIER_ID for us, instead it creates two DEVICE_ID in the DEVICE table.
Any idea and advice will be appreciated.
Thanks.
Wade