Hello all.

I have some questions about a subject that I simply cannot wrap my
head around...

My setup is as follows:

I have three entity types called Shopper, ShoppingList and
ShoppingListItem arranged in an aggregate like this:

Shopper                              (Has a collection of
ShoppingLists, mapped as a bag)
   ShoppingList                    (Has a collection of
ShoppingListItems, mapped as a bag)
      ShoppingListItem           (Only has properties)

The Shopper entity is my aggregate root and the relationships between
the three entity types are all bidirectional. They all have a version
property which is an Int32. When working with these entities in an
ISession I ususally call Get() with the Id of a Shopper and then work
from there.

Now, when I add a new ShoppingList to a Shopper or a new
ShoppingListItem to a ShoppingList (that already belongs to a Shopper)
and call Update() on my ISession object the version of all entities
above the one added in the aggregate are increased. And not only the
ones in the actual "chain" of entities (i.e. the ShoppingList that the
ShoppingListItem belongs to, and the Shopper etc.), but ALL other
ShoppingLists and ShoppingListItems as well that belong to the given
Shopper.

Is this the way that versioning is supposed to work? I could
understand if the Shopper's and the ShoppingList's versions are
updated but it seems strange that all other ShoppingLists and
ShoppingListItems for the shopper should have their versions increased
as well?

I'd be very grateful for any help on this, I've been banging my head
for a couple of days now trying to understand it.

Regards, Jörgen
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to