Core Data and undo with unmodeled properties

  • Hi,

    I have created a subclass of NSManagedObject for my entity and I added another
    property in this class.
    However when I set this property an undo is registered.
    I know undos are also registered for transient properties but this property is
    not even in the model so why is it registered ?

    Cyril Anger
  • Here is the code of my class to better illustrate the problem :

    @interface Account : NSManagedObject {
    NSString *testVar;

    @property (retain) NSString *testVar;


    @implementation Account

    @synthesize testVar;


    Let me add that testVar is not in the entity Account of my Core Data
    model so my guess is it souldn't get undo for free.
    But if I do something like anAccount.testVar = @"Test"; the undo menu
    gets activated. If I click on the undo menu, nothing happens and
    testVar is not resetted to its old value.
    Is this a bug or is it normal behavior ?

    Cyril Anger
previous month november 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    
Go to today