Re: Nead a guru in to-many relations
Re: Nead a guru in to-many relations
- Subject: Re: Nead a guru in to-many relations
- From: Ricardo Strausz <email@hidden>
- Date: Wed, 30 Jul 2003 18:16:46 -0500
On miircoles, juli 30, 2003, at 17:01 America/Mexico_City, Art Isbell
wrote:
On Wednesday, July 30, 2003, at 10:39 AM, Ricardo Strausz wrote:
How can I neast objects of the same kind over and over??
Is there a usefull db/sql/eof mechanism to perform this??
A relationship whose source and destination entities are the same is
called a reflexive relationship. You'll need to add a foreign key to
the entity so you can equate the primary key of the source object with
the foreign key of the destination objects as with any to-many
relationship. EOModeler supports this. You should be able to treat
this as with any to-many relationship. With this configuration, the
number of levels of relationships is not limited.
I suppose a difficulty with this configuration is how to display the
reflexive relationship objects since the number of levels is
unlimited. It may not be easy to automatically prefetch all related
objects because the number of levels can't be known initially.
Are there specific questions you have about such a configuration?
I simply didn't this was possible... I do not know way, but I allways
thought of a relation between two (different) tables, but I will try
with reflexive ones. It sounds like this will do the trick.
Do you have any advise about deletation rules? are they as usal??
I ask this becouse I can imagine (not in my case, but possibly) a loop
of relations and then ownership and deletation rules seems like a
possible problem source which I do not know if it is prevented by EOF.
Gracias Art!
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
Dino
http://homepage.mac.com/strausz
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.