-->
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: failing to saveorupdate inner objects
PostPosted: Wed May 25, 2011 6:43 pm 
Newbie

Joined: Tue Apr 19, 2011 2:37 pm
Posts: 10
hi guys

I am unable to save/update my inner object

I have workflow object, workflow object has Template object and
template object has ArrayList of Questions


when i say session.saveOrUpdate(workflow);
the template object is updated BUT the questions doesnt get updated

my flow is object1-->contains object2-->contains list3.

when saveorupdate is performed on object1, object2 gets persisted but list3 is not persisted. any idea where i am missing?

workflow.hbm.xml
<many-to-one name="template" class="com.hibernate.entity.Template" cascade="save-update" lazy="false" fetch="select">
<column name="TEMPLATE_ID" />
</many-to-one>


template hbm.xml
<bag name="questions" table="QUESTION" inverse="true" lazy="false" fetch="select" >
<key>
<column name="TEMPLATE_ID" not-null="true" />
</key>
<one-to-many class="com.hibernate.entity.Question" />
</bag>

Is the cascade="save-update" causing the template to be updated but the List of question inside the template doesnt get updated.

Been strugling for few days, any help greatly apprecated
thanks


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.