-->
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 relation ?
PostPosted: Thu Oct 14, 2004 10:32 am 
Newbie

Joined: Tue Oct 12, 2004 3:54 am
Posts: 3
Hibernate version: 2.1.6

Relation to map:

Image

JOB_EQUIPMENT.JOB_REFERENCE = JOB_DETAILS.JOB_REFERENCE
JOB_EQUIPMENT.DTL_SEQUENCE = JOB_DETAILS.DTL_SEQUENCE


Try

in jobequipment.hbm.xml :

<many-to-one name="jobdetail" class="JobDetail" update="false" insert="false" >
<column name="DTL_SEQUENCE" property_ref="dtlSeq" />
<column name="JOB_REFERENCE" property_ref="jobRef" />
</one-to-many>

???

in jobdetails.hbm.xml

<bag name="equipments" lazy="true" inverse="true" cascade="true">
<key column="JOB_REFERENCE"/>
<key column="DTL_SEQUENCE"/>
<one-to-many class="JobEquipment"/>
</bag>

?????

Help

I am trying to model with hibernate the relation but I don't manage...

Any help would be greatly appreciated.

Thanks in advance for your help.

Jeangui
jean_gui at yahoo dot fr


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.