这是我的核心数据的GeneratedCode,由xCode Editor自动生成。核心数据中的许多关系
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@class Building, Category, City, District, Image, LatitudeLongitude, OpeningHour, Promotion, Rating, Review, URL;
@interface Business : NSManagedObject {
@private
}
@property (nonatomic, retain) NSString * Website;
@property (nonatomic, retain) NSString * Email;
@property (nonatomic, retain) NSString * Street;
@property (nonatomic, retain) NSString * InBuildingAddress;
@property (nonatomic, retain) NSString * Phone;
@property (nonatomic, retain) NSString * Title;
@property (nonatomic, retain) NSString * Zip;
@property (nonatomic, retain) NSNumber * Price;
@property (nonatomic, retain) NSSet* Promotions;
@property (nonatomic, retain) Building * Building;
@property (nonatomic, retain) NSSet* Categories;
@property (nonatomic, retain) LatitudeLongitude * LatitudeLongitude;
@property (nonatomic, retain) NSSet* Images;
@property (nonatomic, retain) OpeningHour * OpeningHour;
@property (nonatomic, retain) NSSet* Reviews;
@property (nonatomic, retain) NSSet* URLs;
@property (nonatomic, retain) Rating * Rating;
@property (nonatomic, retain) NSSet* Districts;
@property (nonatomic, retain) City * City;
//我加了这3行,为什么不自动生成代码的一部分?
- (void)addDistrictsObject:(District *)value;
- (void)addCategoriesObject:(Category *)value;
- (void)addReviewsObject:(Review *)value;
@end
说我想“清除”所有评论和图像。
Will doing self.Reviews = nil do the trick?
我知道做self.LitudeitudeLongitude = nil会删除自己和它的LatitutudeLongitude之间的关系。