Core Data: Role of transient attributes with derived and non-standard attributes?

  • 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
previous month january 2007 next month
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today