Tuesday, February 5, 2013
Nested vs Root ObjectSpace
I think that the information I've just posted in http://www.devexpress.com/issue=Q472381 will be helpful for new XAF users:
"When designing XAF many years ago we implemented the following behavior:
- if an object is aggregated (when this object is a part of a master object), a nested ObjectSpace is created for it, because this object should not be physically saved to the database until its owner is saved itself.
- if an object is not aggregated (when this object can exist separately), a separate ObjectSpace is used for it.
The same behavior is enforced when opening Views for existing objects, and not only for new ones.
This can be controlled via the virtual GetObjectSpaceToShowViewFrom method of the XafApplication class.
To learn more about ObjectSpace and Views in XAF, check out the following documentation:
In Entity Framework, there is no such entity as NestedObjectSpace or UnitOfWork at all."