Re: Qualifiers LIKE problem
Re: Qualifiers LIKE problem
- Subject: Re: Qualifiers LIKE problem
- From: Greg <email@hidden>
- Date: Fri, 8 Apr 2005 12:14:06 +1000
Bug reported. I just hope that there is a WO team that will actually
see the bug to fix it!
Greg
On 08/04/2005, at 11:50 AM, Chuck Hill wrote:
No. That is a typographical error in the documentation. There should
be a * where you are seeing a space. Looks like some tool munged it.
Report it at http://bugreporter.apple.com
Chuck
On Apr 7, 2005, at 6:43 PM, Greg wrote:
I understand, so in the documentation for EOQualifier,
<Quote>
Using Wildcards and the like Operator
When you use the like or caseInsensitiveLike operator in a qualifier
expression, you can use the wildcard characters and ? to perform
pattern matching, for example:
"lastName like 'Jo '"
matches Jones, Johnson, Jolsen, Josephs, and so on.
</Quote>
Is this example correct? Can you specify with the single quotes a
literal string with a space and it act like a *?
Greg
On 08/04/2005, at 11:33 AM, Sacha Mallais wrote:
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:
village.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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