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:
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
|