magicalpanda / MagicalRecord

Super Awesome Easy Fetching for Core Data!
Other
10.8k stars 1.79k forks source link

the property of the NSManagedObject become empty #1216

Open lehom opened 8 years ago

lehom commented 8 years ago

I make a class named AEGLocation extend NSManagedObject, on the uiviewController as a property (like this @property (nonatomic, strong) AEGLocation location;)。at the begining i fetch the data like this self.location = [AEGLocation MR_findFirstByAttribute:@"locationId" withValue:locationId]; every thing is ok, but after a while the property of "location" become empty, i get the property of "locaton" like NSString name = self.location.name; and found name was nil, why? and more strange sometimes it is not empty and sometimes it is nil。 please help me!!