-->
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: can i do idbag with cascade?
PostPosted: Wed Dec 20, 2006 3:58 pm 
Newbie

Joined: Wed Dec 20, 2006 2:41 pm
Posts: 3
Hey,

I have this mapping:

Code:
<idbag access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.ListAccessor" table="CRITERIA_DICTIONARY_TO_CRITERIA" name="Criterion" lazy="true">
<collection-id type="org.hibernate.type.LongType" column="CriteriaDictionary_Criterion_Hjindex">
<generator class="increment"/>
</collection-id>
<key>
<column name="CRITERIA_DICTIONARY_ID"/>
</key>
<many-to-many class="com.mercado.s2002.analysis.objects.Criterion">
<column name="CRITERIA_ID"/>
</many-to-many>
</idbag>


i dont want hibernate to cascade "Criterion" in case that their parent (CRITERIA_DICTIONARY) exists in the DB.

How can i set cascade="save" in idbag?

How hibernate know that this CRITERIA_DICTIONARY is new in case that the id is assign by application


Thank you


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.