Re: Compound PK generation
Anders Peterson <[email protected]> Mon, 13 Dec 2004 21:46:24 +0100
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Organization | Optimatika |
| Message-ID | <[email protected]> |
Yes, I've learned my lesson regarding to-many relationships and=20 performance. That's why I asked... I was surprised I couldn't get the PK=20 propagated without making the to-many relationships class attributes. I usually have the to-many relationships defined in eomodeler - I just=20 don't make them class attributes. Looked briefly at Thomas' delegate class, but decided it was "easier"=20 for me to simply add new primary key columns. /Anders Chuck Hill wrote: > Why not get rid of the back pointing relationships? As you are not=20 > using them, they will eventually become a performance problem anyway. =20 > You will have to write cover methods to fetch them when needed and=20 > manage referential integrity yourself but it might be a viable solution. >=20 > Chuck >=20 > On Dec 9, 2004, at 4:06 AM, Anders Peterson wrote: >=20 >> Hi, >> >> I have some entities with compound primary keys. The pk components are= =20 >> all foreign keys. >> >> I can't get EOF to generate primary keys for new instances unless I=20 >> set the corresponding to-many relationships (leading to the=20 >> troublesome entity) to be class attributes. >> >> This is going to give me a performance problem. Eventually there will=20 >> be lots of instances =96 huge to-many arrays. >> >> I=92m hoping I=92ve missed something. Is the only way to get rid of th= e=20 >> to-many class attributes to have dedicated primary key columns in=20 >> =93all=94 entities? >> >> /Anders >> >> _______________________________________________ >> EOF mailing list >> [email protected] >> http://www.omnigroup.com/mailman/listinfo/eof >>