Begin forwarded message:
> From: Cail Borrell <[email protected]> > Date: 13. sep 2011 14.45.02 CEST > To: David Avendasora <[email protected]> > Cc: Cail Borrell <[email protected]> > Subject: Re: FrontBasePlugIn & EOQualifier.QualifierOperatorContains > > Hi David, > > I believe it was originally thought of as similar to the like qualifier and > used with double truncated character predicates. > > As far as I can tell the actual meaning of the selector types are not > specified. > If it is considered a bug or otherwise counter intuitive it would make sense > to change > the behavior so it matches the general perception. > > At least for non character data types so nothing is broken. :-) > > However I have not made any changes to the frontbase plugin since it was > submitted to wonder. But I could have a look at it. > > -Cail > > > On 13/09/2011, at 11.37, David Avendasora wrote: > >> 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/cail%40frontbase.com >> >> 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]
