Save and query dependent objects
Chris Muller
asqueaker at gmail.com
Tue Nov 27 01:28:38 UTC 2007
> Do I need some special code to ensure that the objects will not be saved twice? As far as I can see, if an object is part of another object (in its instVar) in a Magma DB and is put separately in a Magma Collection it will be stored only once. I can look for it via a query and change it or I can look for it traversing my domain model and change it there - so it seems that the object is really only once in the DB. In my test code it worked this way. I'm right with this? (I'm a little bit confused about this magic ... ).
MagmaCollections behave no differently than regular Collection's
hierarchy the base library in this respect. They may both reference a
single domain object simultaneously, the exact shape of the model,
with cycles, is preserved.
More information about the Magma
mailing list