Re: need variable # core model properties for entity
Re: need variable # core model properties for entity
- Subject: Re: need variable # core model properties for entity
- From: Quincey Morris <email@hidden>
- Date: Mon, 21 Feb 2011 10:25:02 -0800
On Feb 21, 2011, at 09:30, Shane wrote:
> I have data fields that come from a record (row) that was imported
> from a file, so it's like an array of numbers which is currently
> unknown until the user assigns meaning to these data fields.
>
> I'm wondering if an entity can have a property w/ an array (or
> variable length of types) type of data. My reasoning is that these
> variable number of datas are all part of the same record or problem
> set.
Yes, it can literally have an NSArray property, if you use transformable attributes:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/Articles/cdNSAttributes.html#//apple_ref/doc/uid/TP40001919-SW9
The standard archiving transformer should work fine. (You can also write your own value transformer if you have a reason to, but you'll have to deal with endianness and other architecture-related issues on your own, if you go that route.)
_______________________________________________
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