Hi Sebastian,
thank you for your suggestions. I've tried them out - storing the whole model starting with the top node. Beside that I created MagmaCollections to store objects for quick access via queries, as you suggested:
As far as I know nothing stops you to have in other part of the odb the cars that also refers (have in its instVars) lots of those parts. That way you won both: the easiness of having all the parts indexed in a magma collection (usually the only efficient approach in the relational world) and the conceptual model of it's position in the "car space".
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 ... ).
Thanks, carsten _____________________________________________________________________ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
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.
magma@lists.squeakfoundation.org