discuss-gnustep
[Top][All Lists]
Advanced

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

[GDL2] Many-to-many relationships


From: Dirk Lattermann
Subject: [GDL2] Many-to-many relationships
Date: Sat, 31 May 2003 12:50:15 +0200
User-agent: Mutt/1.4i

Hi,

I decided to try out what's written in Chapter 4, section
"Modelling Many-To-Many Relationships" of the EOF Developer's Guide.
I have two tables and a correlation table.  Now I'm trying to model
a flattened relationship from the first table (werke) via the
correlation table (wk) to the second (wk2).

werke has a to-many relationship (werkteile) to wk2, and wk2 a
to-one relationship (teil) to wk2.

To model the flattened relationship, I add werkteile.teil as a
class property to werke. This yields

 EOEntity.m:1052  Assertion failed in EOEntity(instance), method 
classProperties.  No attribute or relationship named werkteile.teil to use as 
classProperty in entity {attributes = ({columnName = name; externalType = 
varchar; name = name; valueClassName = NSString; width = 200; }, {columnName = 
w_nr; externalType = int4; name = werkNummer; valueClassName = NSNumber; 
valueType = i; }); attributesUsedForLocking = (name); className = 
EOGenericRecord; classProperties = (name); externalName = werke; name = werke; 
primaryKeyAttributes = (werkNummer); relationships = ({destination = wk; 
isToMany = Y; joinSemantic = EOLeftOuterJoin; joins = ({destinationAttribute = 
werkNummer; sourceAttribute = werkNummer; }); name = werkteile; }); }

 Am I using the right way in the model file (then maybe flattened
 relationships are not yet implemented)?  I experimented with different
 classProperties in the different tables (which attributes or
 relationships are classProperties, which aren't), but to no avail.

 Thank you,
 Dirk Lattermann

Attachment: werke.plist
Description: Text document

Attachment: wk.plist
Description: Text document

Attachment: wk2.plist
Description: Text document


reply via email to

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