• 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: Core Data & Custom Class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data & Custom Class


  • Subject: Re: Core Data & Custom Class
  • From: Todd Freese <email@hidden>
  • Date: Tue, 27 Dec 2005 17:17:58 -0600

Thanks. The wording was a little confusing, but I get it now.

Cheers,

Todd

On Dec 27, 2005, at 4:49 PM, mmalcolm crawford wrote:


On Dec 27, 2005, at 2:28 PM, Todd Freese wrote:

Just starting to port my first application to core data. I am a little confused on when to use a custom managed object class. I have created my data model in the modeler. Is there a set of guidelines on when you need to create custom class files from the data modeler?

"NSManagedObject is a generic class that implements all the basic behavior required of a managed object. You may create custom subclasses of NSManagedObject, although this is often not required. **If no custom logic is needed, a complete object graph can be formed with NSManagedObject instances.**"

<http://developer.apple.com/documentation/Cocoa/Reference/ CoreData_ObjC/Classes/NSManagedObject_index.html>

One of my data classes needs to store a custom type. I created a transient, undefined attribute and a persistent, binary attribute. I assume that I need to generate files in order to create the accessor methods.

Yes:
<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/ Articles/cdNSAttributes.html>:

Basic Approach

[...] **You then implement a custom managed object class with suitable accessor methods for the transient attribute that retrieve the value from and store the value to the persistent attribute.**"


But do I have to do this for all my data classes, or just the ones that need a little more tweaking?

See above.

mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40filmworkers.com

This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Core Data & Custom Class (From: Todd Freese <email@hidden>)
 >Re: Core Data & Custom Class (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Mixing controls in NSTableView
  • Next by Date: Re: Agent Applications and launchd
  • Previous by thread: Re: Core Data & Custom Class
  • Next by thread: Mixing controls in NSTableView
  • Index(es):
    • Date
    • Thread