I have a question about what the EOQualifier.QualifierOperatorContains is 
supposed to be for.

I have always used it with Oracle and MSSQL Server as a way to create 
qualifiers that check to see if an Object is one of the objects in a toMany 
relationship. For example:

EOQualifier thatHaveMeAsAFriend = Person.FRIENDS.containsObject(me);
kevinBacon.friends(editingContext(), thatHaveMeAsAFriend, null);

Which should generate a WHERE clause something like:

WHERE T1.Person_ID = 1

Only with FrontBase, the PlugIn overrides the handling of 
EOQualifier.QualifierOperatorContains and treats it as though you are searching 
for a substring, you know, what EOQualifier.QualifierOperatorLike already does.

The SQL that it generates is:

WHERE T1.Person_ID like 1

Which FrontBase promptly, and correctly, chokes on.

If I simply comment out the plugin's overriding of 
_FrontBasePlugIn#sqlStringForSelector(NSSelector, Object) then my qualifier 
works as expected.

Oh, and just to make my case stronger, if you apply the above qualifier 
in-memory (take the DB out of the equation), it also works correctly.

It appears that the code has been there at least since Oct. 2008.

Is my interpretation of what the plugin should be doing incorrect? Are people 
out there using the EOQualifier.QualifierOperatorContains and expecting a 
"like" in their SQL's WHERE clause?

Thanks!

Dave


 _______________________________________________
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