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
|