Do you have goshts?
----- Original Message -----
From: "Meidan" <[email protected]>
To: "nhusers" <[email protected]>
Sent: Tuesday, October 13, 2009 12:37 PM
Subject: [nhusers] why unchanged items in a collection are updated when root
is update?
I have a root entity which has a set mapping collection of child
entities
<set name="Childs" lazy="false" cascade="save-update"
inverse="true">
<cache usage="read-write" />
<key column="RootId"/>
<one-to-many class="Child"/>
</set>
when I add a child to the root and update it, there is an update
statment for each of its unchanged childs:
UPDATE Childs
SET ChildName = 'aa' /* @p0 */,
RootId = 16 /* @p1 */
WHERE Id = 49 /* @p2 */
Is there a way to avoid it?
I just want the new child inserted to the Childs table.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.