• 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
Building the correct compound EOQualifer for a many-to-many relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Building the correct compound EOQualifer for a many-to-many relationship


  • Subject: Building the correct compound EOQualifer for a many-to-many relationship
  • From: George Domurot <email@hidden>
  • Date: Sat, 22 Jul 2006 08:56:16 -0700

When building a compound qualifier for a many-to-many relationship, against flattened relationships, EO doesn't seem to generate the appropriate SQL.

Structure:

Record <<-->> Group (where as these are flattened relationships with a intermediary RecordGroup join table)

Qualifier:

Records belonging to Group A
--and--
NOT (Records belonging to Group B)

I've attempted to use both EOQualifier.QualifierOperatorContains and EOQualifier.QualifierOperatorEquals, both generate SQL in the form:

(not (group.groupID = ?) AND group.groupID = ?)

Through hand coding the SQL, using the join table along with IN and NOT IN operators, I've written the following SQL to return accurate results:

(recordGroup.recordID NOT IN (SELECT recordID FROM RecordGroup WHERE groupID = ?)) AND (recordGroup.recordID IN (SELECT recordID FROM RecordGroup WHERE groupID = ?))

I think I'm probably missing a simple piece of the puzzle here. All other non-compound qualifiers work fine. Any thoughts on how to build the correct qualifier?

Thanks,
George


--

George Domurot

email@hidden


 _______________________________________________
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

  • Follow-Ups:
    • Re: Building the correct compound EOQualifer for a many-to-many relationship
      • From: Timo Hoepfner <email@hidden>
  • Prev by Date: Re: T-shirts at WWDC?
  • Next by Date: Re: Having trouble with WOFileUpload
  • Previous by thread: Re: New T-Shirts
  • Next by thread: Re: Building the correct compound EOQualifer for a many-to-many relationship
  • Index(es):
    • Date
    • Thread