• 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: CoreData: Fetching object with maximum of property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData: Fetching object with maximum of property


  • Subject: Re: CoreData: Fetching object with maximum of property
  • From: Negm-Awad Amin <email@hidden>
  • Date: Wed, 8 Oct 2008 09:35:48 +0200


Am Mi,08.10.2008 um 05:42 schrieb Bill Dudney:

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)"
Great, I missed this. I'll check it.

Thanks!

Cheers


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

Amin Negm-Awad 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


References: 
 >CoreData: Fetching object with maximum of property (From: Frank Illenberger <email@hidden>)
 >Re: CoreData: Fetching object with maximum of property (From: Bill Dudney <email@hidden>)
 >Re: CoreData: Fetching object with maximum of property (From: Frank Illenberger <email@hidden>)
 >Re: CoreData: Fetching object with maximum of property (From: Bill Dudney <email@hidden>)

  • Prev by Date: Re: Core Data: Copying and pasting chained entities
  • Next by Date: Re: Next Key View doesn't "go to" pushbutton
  • Previous by thread: Re: CoreData: Fetching object with maximum of property
  • Next by thread: Re: CoreData: Fetching object with maximum of property
  • Index(es):
    • Date
    • Thread