Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4622306
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:49:29+00:00 2026-05-22T02:49:29+00:00

This is my GeneratedCode for Core data, automatically generated by xCode Editor. #import <Foundation/Foundation.h>

  • 0

This is my GeneratedCode for Core data, automatically generated by 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;

//I added these 3 lines, why not part of automatically generated Code?

- (void)addDistrictsObject:(District *)value;
- (void)addCategoriesObject:(Category *)value;
- (void)addReviewsObject:(Review *)value;

@end

Say I want to “clear” all Reviews and image.

Will doing self.Reviews=nil do the trick?

I know that doing self.LatitudeLongitude=nil will delete the relationship between self and it’s LatitutudeLongitude.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:49:30+00:00Added an answer on May 22, 2026 at 2:49 am

    EDIT – Not sure if you mean “clear” as in delete. My answer below is assuming that you want the objects gone from the context; not just severing the relationship between the NSManagedObjects

    I don’t believe

    self.Reviews = nil;
    

    will actually delete your Review objects for the Managed Object Context. That would send the release message to each one, but to delete them from the context you have to call

    [aContext deleteObject:reviewObj];

    on each one in the set. If you were to delete one of your Business objects (using “deleteObject” as shown above) and you had your relationship delete rules set to “Cascade”, then I believe that would cause all of the Review, City, etc… objects owned by that Business object to be deleted automatically, but that is the only other way that I know of that will cause NSManagedObjects to be deleted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Edit Downvoter, how is this a bad question? I have provided runnable example code
Not getting into too many specifics, this is a high level question. I've always
can I change background color for disabled <h:inputText> ? I've tried to do this
I'm writing a class library and came across the need to make a namespace
Basically if I have the following: [DataContract] public class Foo { [MyCustomAttribute(...)] [DataMember(IsRequired =
I'm working on a tool that generates C code from a specification. Users thus
There is a WSDL webservice that is out of my control that I'm having
I'm learning ASP.NET MVC 3 and trying to create a View with a single
I'm having an odd problem with asp.net MVC razor view. I want my model
I have a existing DB and I use the approach DB First with Entity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.