Re: "Clean" SQL (Avoid multiple reference to a table)
Re: "Clean" SQL (Avoid multiple reference to a table)
- Subject: Re: "Clean" SQL (Avoid multiple reference to a table)
- From: Lachlan Deck <email@hidden>
- Date: Sun, 6 May 2007 13:01:13 +1000
Hi there,
On 05/05/2007, at 11:15 AM, John Kuczynski wrote:
Is there any way to influence EOF to generate better SQL (i.e. no
repetition of a Table name when doing a many-many join)?
Are there any 3rd party libraries that fix what's described below?)
Don't know.
----------------
I have a many-many relationship between Users and Groups:
USER <<--- USERGROUP --->> GROUP
i.e. A User owns 1..n Groups
i.e. A Groups owns 1..n Users
It's modeled properly in EOModeler, and the relationships are
flattened...
If I do a fetch similar to this:
NSMutableArray qualfiers = new NSMutableArray();
EOKeyValueQualifier qualifier1 = new EOKeyValueQualifier
( "ownedGroups.ownerUser", EOQualifier.QualifierOperatorEqual, user );
qualifiers.add( qualifier1 );
EOKeyValueQualifier qualifier2 = new EOKeyValueQualifier
( "ownedGroups.users", EOQualifier.QualifierOperatorEqual,
otherUser );
Shouldn't that be... EOQualifier.QualifierOperatorContains? It is a
toMany relation rather than a toOne...
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden