NSManagedObject - NSSet gets removed ??
- by aryaxt
I have an nsmanagedObject this NSManagedObject contains an NSSet.
the data for NSSet get's lost when i call release on an NSManagedObject with retain count of 2.
Wouldn't retaining an NSManagedObject also retain all it's properties??
- (id)initViewWithManagedObject :(NSManagedObject)obj
{
if (self = [super init])
{
self.managedObject = obj;
}
}
- (void)dealloc
{
[self.managedObject release];
//Here is when the nsset data gets removed
[super dealloc];
}
Below describes how the property was created
@interface MyManagedObject :NSManagedObject
@property (nonatomic, retain) NSSet *mySet;
@end
@implementation MyManagedObject
@dynamic mySet;
@end