• 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
Re: EOQualifier wildcard problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOQualifier wildcard problem


  • Subject: Re: EOQualifier wildcard problem
  • From: Awbrey Tyler Hughlett <email@hidden>
  • Date: Mon, 10 Nov 2008 17:27:25 -0600


On Nov 10, 2008, at 5:20 PM, Ramsey Gurley wrote:

Are you sure this is what isn't working for you?  Perhaps a typo?

String cityWildcard = "lub";
NSArray args = new NSArray(cityWildcard + "*");
EOQualifier qual1 = EOQualifier.qualifierWithQualifierFormat("city caseInsensitiveLike 'lub*'", null);
EOQualifier qual2 = EOQualifier.qualifierWithQualifierFormat("city caseInsensitiveLike %@", args);
boolean qual1EqQual2 = qual1.equals(qual2);


result: qual1EqQual2 => true

In any case, you should probably be using %s for strings instead of %@. %@ is for objects, where %s is for strings.

http://developer.apple.com/documentation/DeveloperTools/Reference/WO541Reference/com/webobjects/eocontrol/EOQualifier.html

Ramsey

On Nov 10, 2008, at 4:31 PM, Awbrey Hughlett wrote:

Why does this work for matching the word "Lubbock":

EOQualifier.qualifierWithFormat("city caseInsensitiveLike 'lub*'", null);

qualifierWithQualifierFormat?

^ The typos were in the mail and not the code. Sorry.





and not this:

String cityWildcard = "lub";
NSArray args = new NSArray(cityWildcard + "*");
EOQualifier.qualifierWithFormat("city caseInsensitiveLike %@", args);


Am I missing something? I read the webobjects reference documents on this and they didn't point out the problem. If it makes any difference, I am using webobjects 5.3 and
Wonder. Can anyone help please?



Thanks, Awbrey _______________________________________________ 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


I tried it with %s and that didn't help. Lachlan Deck suggested I use EOKeyValueQualifier() which worked wonders. That should do what I want, but thanks for the help.



Thanks all, Awbrey _______________________________________________ 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
References: 
 >EOQualifier wildcard problem (From: Awbrey Hughlett <email@hidden>)
 >Re: EOQualifier wildcard problem (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: EOQualifier wildcard problem
  • Next by Date: Re: EOQualifier wildcard problem
  • Previous by thread: Re: EOQualifier wildcard problem
  • Next by thread: JNDI Datasource vs JDBC (Tomcat deployment)
  • Index(es):
    • Date
    • Thread