• 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: need variable # core model properties for entity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >need variable # core model properties for entity (From: Shane <email@hidden>)

  • Prev by Date: Re: How to detect when an NSTextView has finished being loaded into a window?
  • Next by Date: drawRect: GCContext errors
  • Previous by thread: need variable # core model properties for entity
  • Next by thread: Re: How to detect when an NSTextView has finished being loaded into a window?
  • Index(es):
    • Date
    • Thread