[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GDL2] Question about relation definition and faulting

From: Stéphane Corthésy
Subject: Re: [GDL2] Question about relation definition and faulting
Date: Wed, 19 Feb 2003 09:08:08 +0100

On Tuesday, Feb 18, 2003, at 21:03 Europe/Zurich, Manuel Guesdon wrote:


Question for EOF/GDL2 gurus :-)

I have 4 entities A, B, C, D, with relation A<->B, B<->C, C<->D
I also have a relation to 'jump' from A to C with a definition named aToC like
If I de-fault this relation and get (for example) an empty array (matching B record exists but there's no B related C record) and next add D and C records with C matching the B record, As aToC, is already de-faulted, the array is still

Do you think it's 'normal' so I need to refault aToC or explicitely add object to both side of a relation named cToA
(i.e. GDL2 is right).

I can't say it's "normal", but it's the way it's implemented in EOF. Flatten relationships have nasty "side-effects", and should be avoided, IMHO, except for readOnly (final) properties, as flatten attributes/relationships are not updated automatically, or when intermediate entity has no class-properties. BTW, flattening a relationship has quite no sense when the intermediate entity has class-properties: it has full sense though when building many-to-many relationships with an intermediate entity that no class-properties at all.

Or do you think aToC relation shouldn't be a fault array but a call to something like valueForKeyPath:@"aToB.bToC" (i.e. dynamically trying to find matching values) ? And if yes, is it a problem of GDL2 or is it a wrong model ?

Seems current implementation is like EOF's. I'd say you should not change it, but document the way flattening works, and when it can be used "safely".


Thank you !!


Manuel Guesdon - OXYMIUM <address@hidden>
14 rue Jean-Baptiste Clement  -  93200 Saint-Denis  -  France
Tel: +33 1 4940 0999  -  Fax: +33 1 4940 0998

Gnustep-dev mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]