• 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: Qualifiers LIKE problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Qualifiers LIKE problem


  • Subject: Re: Qualifiers LIKE problem
  • From: Greg <email@hidden>
  • Date: Fri, 8 Apr 2005 11:02:59 +1000

Hi Arturo,
I started out making a generic component and when it wasn't behaving as expected, I moved it into an existing component to see what was going wrong, hence the hard coding of the filter key.


It seems that Arts' suggestion of

filter = EOQualifier.qualifierWithQualifierFormat("lastName like %@", new NSArray(letter + "*"));

does the trick. If you do %@*, causing it to throw an exception when parsing. Why can't you put the wildcard in the string?


Greg


On 08/04/2005, at 10:52 AM, Arturo Pérez wrote:

Hi Greg,

I'm curious. Why did you pass the lastName as a parameter if you could hardcode it as you do below?

On Apr 7, 2005, at 7:45 PM, Greg wrote:

For some reason it was trying to filter "lastName like 'lastName*' when I was passing in the letter as the argument. I got around this by constructing the string query myself and it works like a charm, tough it doesn't explain why the proper way isn't working for me.

private void setFilterToLetter(String letter) {
StringBuffer buf = new StringBuffer();
buf.append("lastName like '");
buf.append(letter);
buf.append("*'");
filter = EOQualifier.qualifierWithQualifierFormat(new String(buf), null);
}


Thanks for all the tips.

greg

On 08/04/2005, at 8:04 AM, Sacha Mallais wrote:

On Apr 7, 2005, at 2:59 pm, Greg wrote:

It still seems to be filtering everything out. Is there some debugging method that will show the SQL for the filter?

Hi Greg,

Use -EOAdaptorDebugEnabled true on the command line to log all SQL.

HTH,


sacha


-- Sacha Michel Mallais - 400 lb. chimp Global Village Consulting Inc.: http://www.global-village.net/ Choke on that, causality! -- the Professor, "Futurama"



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden




_______________________________________________ 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
  • Follow-Ups:
    • Re: Qualifiers LIKE problem
      • From: Sacha Mallais <email@hidden>
References: 
 >Qualifiers LIKE problem (From: Greg <email@hidden>)
 >Re: Qualifiers LIKE problem (From: Chuck Hill <email@hidden>)
 >Re: Qualifiers LIKE problem (From: Greg <email@hidden>)
 >Re: Qualifiers LIKE problem (From: Sacha Mallais <email@hidden>)
 >Re: Qualifiers LIKE problem (From: Greg <email@hidden>)

  • Prev by Date: Re: WOPopUp For Newbie
  • Next by Date: Re: Qualifiers LIKE problem
  • Previous by thread: Re: Qualifiers LIKE problem
  • Next by thread: Re: Qualifiers LIKE problem
  • Index(es):
    • Date
    • Thread