• 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
FrontBasePlugIn & EOQualifier.QualifierOperatorContains
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FrontBasePlugIn & EOQualifier.QualifierOperatorContains


  • Subject: FrontBasePlugIn & EOQualifier.QualifierOperatorContains
  • From: David Avendasora <email@hidden>
  • Date: Tue, 13 Sep 2011 17:37:35 +0800

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Interface file not loaded
  • Next by Date: Re: Interface file not loaded
  • Previous by thread: Re: Interface file not loaded (solved)
  • Next by thread: Fwd: FrontBasePlugIn & EOQualifier.QualifierOperatorContains
  • Index(es):
    • Date
    • Thread