Core Data: Role of transient attributes with derived and non-standard attributes?
Core Data: Role of transient attributes with derived and non-standard attributes?
- Subject: Core Data: Role of transient attributes with derived and non-standard attributes?
- From: Henrik Nyh <email@hidden>
- Date: Sat, 27 Jan 2007 15:56:50 +0100
I've read "Core Data Programming Topics", but I don't quite get what the
role of transient attributes is when working with derived or
non-standard attributes.
I would be very grateful if someone could clarify this for me.
Assume I subclass NSManagedObject and define a method like -(NSString
*)fullName that will return the first and last name attributes concatenated.
When would I need to add a fullName transient attribute to the entity?
Is this necessary for undo/redo support? Does it also have implications
on e.g. what predicates I can use to retrieve objects of this entity type?
If I would add a -(NSImage *)firstNameAsImage method that creates an
image based on the first name, would the answer be the same?
Assuming I don't need undo/redo support, would there be benefits (or
drawbacks) to caching the firstNameAsImage as a transient attribute
rather than as an instance variable of the NSManagedObject subclass?
--
Henrik Nyh
http://henrik.nyh.se
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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