All,
I'm trying to sort out performance on a 1.2 NH app I've inherited. It
works on the "Aggregate root" concept, i.e. a parent entity owns
children and when the parent it cascades any changes down to the
children automatically.
The amount of UPDATE/DELETE/INSERT generated against objects that are
loaded but not changed is staggering.
I've been experimenting with lots things (the first is an upgrade to
2.1.x and it seems better) I need to do to sort it out, but can anyone
explain why this sample set mapping from the upgraded version:
<set name="Children" table="ChildEntity" inverse="true"
cascade="all-delete-orphan" lazy="extra">
<key column="EntityId" />
<one-to-many class="ChildEntity"/>
</set>
on an INSERT of the parent and an INSERT of the child does 3 SQL
statements from a simple Session.Save(entity)
1 INSERT for the parent
2 INSERT for the child
1 UPDATE of the parent VERSION column
I can't understand why the last UPDATE takes place - it doesn't seem
to have any purpose.
Thanks
--
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.