Re: Core Data: fetching a subset of attributes/columns
Re: Core Data: fetching a subset of attributes/columns
- Subject: Re: Core Data: fetching a subset of attributes/columns
- From: Gabriel Fernandez <email@hidden>
- Date: Sun, 21 Mar 2010 11:45:58 -0400
Thanks! You mean "Read the API documentation, AND the header comment for this method." Setting resultType to dictionary is mentioned in NSFetchRequest.h only.
----------------------------------------------------------------
Gabriel Fernandez
Wheel Software
On Mar 21, 2010, at 10:46 AM, Jim Correia wrote:
> On Mar 20, 2010, at 1:52 PM, Gabriel Fernandez wrote:
>
>> I wanted to get a subset of an entity's attributes because one of the ManagedObject's attributes is a large image.
>
> […]
>
>> 2) using the -setPropertiesToFetch: method of NSFetchRequest, with the "id" NSAttributeDescription I'm looking for as the only object in the properties array. But when I use the -(NSArray*) properties method of the fetched objects, the "image" attribute is there with a non-nil value.
>
> Read the API documentation, or the header comment for this method.
>
> /* Specifies a collection NSPropertyDescriptions that should be returned by the result. This value is only used if resultType is set to NSDictionaryResultType. Property descriptions added to valuesToFetch may represent attributes, expressions, or to one relationships; for attribute or relationship descriptions, the name must match the name of a description on the fetch entity. Results of the fetch will be returned as dictionaries containing key/value pairs where the key is the name of the specified property description. */
>
> — Jim
_______________________________________________
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