Prevent transient attributes to mark the database as dirty ?
Prevent transient attributes to mark the database as dirty ?
- Subject: Prevent transient attributes to mark the database as dirty ?
- From: Eric Morand <email@hidden>
- Date: Wed, 31 May 2006 13:33:39 +0200
Hi List,
I'm encountering a strange issue. When I update a transient
attribute, the database is marked as dirty (in other words :
[myManagedObjectContext hasChanges] return YES).
Here is the method I use to set my transient property (named
"balance") :
- (void)setBalance:(NSDecimalNumber *)value
{
if ( balance != value )
{
[self willChangeValueForKey:@"balance"];
[balance release];
balance = [value retain];
[self didChangeValueForKey:@"balance"];
}
}
Note that I NEED the willChange... and didChange... calls because I
want the changes to this attribute to be notified to KVO observers.
Note also that these two calls are responsible of the dirtiness of
the database.
Is there a way to prevent this behavior, very problematic ?
Eric.
_______________________________________________
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