Re: CoreData: Fetching object with maximum of property
Re: CoreData: Fetching object with maximum of property
- Subject: Re: CoreData: Fetching object with maximum of property
- From: Bill Dudney <email@hidden>
- Date: Tue, 07 Oct 2008 21:42:58 -0600
Hi Frank,
Sorry for not getting back sooner;
http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/Articles/pBNF.html#/
/apple_ref/doc/uid/TP40001796-217785
documents the BNF which is very cryptic but tells you everything that
can be in the expression.
So something like this for the predicate;
@"loanToValueRatio = max(loanToValueRatio)"
should work but its been a while since I've messed with it. I did have
somethign very similar to this working in a project I did last year.
I'm running off fallible memory here but I believe that the CD SQLite
stuff will convert this to the proper SQL.
Good luck!
-bd-
http://bill.dudney.net/roller/objc
On Oct 7, 2008, at 6:04 AM, Frank Illenberger wrote:
Hi Bill,
I tried using predicates for this but did not succeed.
What would a predicate look like which finds the object of an entity
with the maximum value for a property?
Frank
On Oct 7, 2008, at 1:08 PM, Bill Dudney wrote:
Hi Frank,
That and a whole lot more;
http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/predicates.html#/
/apple_ref/doc/uid/TP40001798
Good luck!
-bd-
http://bill.dudney.net/roller/objc
On Oct 7, 2008, at 3:49 AM, Frank Illenberger wrote:
Hi everybody,
does anybody know if CoreData under Leopard offers a way to fetch
the object of an entity which the maximum of a certain property
value, but without having to fetch all objects into memory?
Cheers
Frank
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden