-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: set mapping
PostPosted: Thu Jun 16, 2005 8:33 pm 
Newbie

Joined: Fri Jun 03, 2005 2:15 pm
Posts: 14
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.