• 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: Sacha Mallais <email@hidden>
  • Date: Thu, 7 Apr 2005 18:33:01 -0700

On Apr 7, 2005, at 6:02 pm, Greg wrote:

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

Greg:

%@ in a qualifier isn't quite like %s in a format string (in fact, %s in a qualifier isn't quite like %s in a format string either...). It's supposed to work for _any_ object, so for example, if I had Order and OrderItems, I could construct a qualifier for OrderItems with this:

EOQualifier.qualifierWithQualifierFormat("order = %@", new NSArray(myOrder));

This would return all OrderItems with the order attribute (i.e., relationship) equal to myOrder. This is represented in SQL as an inner join on the global ID (i.e., primary key) of myOrder.

%@ also, as you've recently discovered, quotes strings properly. It also handles different types of numbers properly. It's very powerful. In fact, I very rarely use anything -other- than %@...

Cheers,


sacha


-- Sacha Michel Mallais - 800 lb. gorilla Global Village Consulting Inc.: http://www.global-village.net/ Bottom posting is your friend: http://www.river.com/users/share/etiquette/

_______________________________________________
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: Greg <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>)
 >Re: Qualifiers LIKE problem (From: Greg <email@hidden>)

  • Prev by Date: Re: Qualifiers LIKE problem
  • 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