Re: [Glorp-development] resolving containing object
Status: Pre-Alpha
Brought to you by:
alan_knight,
anthonylander,
boris_popov,
cdegroot,
and 4 others
From: Norbert H. <no...@ha...> - 2007-06-29 12:21:08
|
On Fri, 2007-06-29 at 10:30 +0000, Martin J. Laubach wrote: > | >of a parent node. What I meant would be the GlorpTreeNode which > | >resolves it parent node at no cost while traversing. > > I believe Norbert wants some kind of synthetic attribute that is > set upon fetching an object. Something along the lines of (I'm making > this up): > > session readManyOf: Foo > onReadDo: [ :obj | obj parent: someParent ] > > Does this sound about right? > Yes, I didn't know my english is that bad :) I always like to know which parent an object has (to resolve the top node which is the owner). Especially if I use components which have a list model of objects it would help if the elements in the list know their parent. (as the collection isn't able to carry extra information) To be a bit clearer: I have two kind of objects - non-shared objects. These have an implicit owner as they are only contained in a structure which is carried by a single user. There can be no other reference from someone else to this kind of objects That are the ones which should resolve its parent - shared objects. Objects that can be shared among users. These objects have an owner field to explicitly specify which one is the owner of the object. At the moment ownership is carried by the web components which display the model and I don't like it. As soon as I can determine the owner in a reliable and fast way from the model itself I'm going to change that. thanks, Norbert |