• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "Clean" SQL (Avoid multiple reference to a table)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >"Clean" SQL (Avoid multiple reference to a table) (From: John Kuczynski <email@hidden>)

  • Prev by Date: Re: Force quit without monitor
  • Next by Date: Re: Trying to create a dynamic url with the components action?
  • Previous by thread: Re: "Clean" SQL (Avoid multiple reference to a table)
  • Next by thread: MEETING: Chicago CocoaHeads / CAWUG Tuesday May 8th - Input Fuzzing
  • Index(es):
    • Date
    • Thread