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: Jim Correia <email@hidden>
- Date: Sun, 21 Mar 2010 10:46:41 -0400
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