-->
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.  [ 3 posts ] 
Author Message
 Post subject: Save set does not save set details
PostPosted: Tue Feb 01, 2005 11:16 am 
Newbie

Joined: Wed Dec 08, 2004 11:30 am
Posts: 8
I am using collection-composite-element, having mapping

<set
name="assignedMachineList"
table="employee_machines"
lazy="false"
inverse="true"
cascade="all"
sort="com.mrt.vend.desktop.model.AssignedMachine"
>

<key
column="emd_emp_id"
>
</key>

<composite-element
class="com.mrt.vend.desktop.model.AssignedMachine"
>

Saving object containing above specified sorted set, does not save any changes to any of the elements on the set.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 01, 2005 2:54 pm 
Newbie

Joined: Tue Feb 01, 2005 2:49 pm
Posts: 1
Changes made only to the inverse end of the association are not persisted. You have to manually save()/delete() the set-elements, if the assignedMachineList is modified.
Another alternative ist to declare the other end of the relationship as "inverse".


Top
 Profile  
 
 Post subject: Save composite-element does not work
PostPosted: Wed Feb 02, 2005 4:23 am 
Newbie

Joined: Wed Dec 08, 2004 11:30 am
Posts: 8
I can set inverse = false, however this is causing to perform insert without delete, I mean it tries to insert existing rows, it fails on key constraint violation.
On other hand I can not delete these rows upfront because composite-element is not persisted itself. The only way I see it can work is to delete these rows upfront manually.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

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.