Hi George,

try using one of the qualifiers found here: http://www.bernard-web.com/pierre/webobjects/code.html These were suggested to me by Chuck a few days ago. I'm certain they'll solve your problem. 

You have to build them as Framework and put that in your project. If you just copy the source files, make sure, the static block of PrincipialClass gets executed at startup (e.g. by stating "new PrincipalClass()" in the constructor of your Application class. This is done automatically if you go the framework approach.

Timo



Am 22.07.2006 um 17:56 schrieb George Domurot:

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

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to