-->
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: many-to-many table mapping
PostPosted: Fri Mar 26, 2004 10:00 am 
Newbie

Joined: Fri Mar 26, 2004 9:23 am
Posts: 3
Hi folks,

I'm using Hibernate 2.1 and I'm trying to map a many-to-many with the following code:

<set
name="setName"
table="ColTableName"
lazy="true"
inverse="false"
cascade="none"
sort="unsorted"
>

<key
column="local_id"
/>

<many-to-many
class="OtherClass"
column="other_id"
outer-join="auto"
/>

</set>

Aditional info: local_id and OtherClass.other_id are of type NUMBER(7,0)

When the DDL is generated the collection table (ColTableName) is created with local_id and other_id of type NUMBER(19,0). I don't think it is needed, but I also tried to insert:
<column name="other_id" sql-type="NUMBER(7,0)" />
inside the many-to-many tag, but it didn't work...

Could some good soul help me ?

Thanks in advance,

Walter


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.