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

  • SEARCH
  • Home
  • 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 8731175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:10:17+00:00 2026-06-13T09:10:17+00:00

I currently have two entities, a category entity and an item entity, where Category:Item

  • 0

I currently have two entities, a category entity and an item entity, where Category:Item is 1:m.

I have applied the “No Action” rule to the Category -> Item relationship, and implemented Category.prepareForDeletion to move all items in the category to a special catch-all category prior to deleting the category (the catch-all category is not deletable).

- (void)prepareForDeletion {
    Category *misc = [Database theMiscCategory];
    [misc addItems:self.items];
    [super prepareForDeletion];
}

My question is this: am I missing anything? And if not, how do I turn off the XCode warning about “No Action” being an advanced feature?

FTR, I’m not using nullify because it is more convenient for other areas of the application to dump stuff in a “misc” category rather than handling items with a null category. I did actually try that originally, but got some unexpected behaviour – if I put the call to super first, the relationships were nullified before I could collect the set of items to change, if I put it after then the relationships to the new category got nullified. I suppose I could collect them, then call super, then set the new category, but that seems klunky.

So I do think “No Action” is what I want, just want to make sure I’m not missing anything else that I should be managing in prepareForDeletion.

  • 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-06-13T09:10:18+00:00Added an answer on June 13, 2026 at 9:10 am

    So, between reading & soak time, the answer seems to be very simple: yes, if you have a reason to use “nullify”, then what you need to do is implement prepareForDeletion appropriately to maintain referential integrity.

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

Sidebar

Related Questions

I currently have two entities in my database: Subjects Timetable In my Timetable entity
I'm currently facing in problem using Core Data. I have two entities A and
I have a many-to-many relationship defined between two entities using an association table and
I currently have two entities in LLBLGen and would like to merge them together
Currently In our database design we have an circular reference between two entities. In
I have two entities, User and UserSetting. The obvious relationship between these two has
I'm doing some tests using NHibernate and I currently have two mapped entities, Orders
I currently have two different models: User and Project . The User model has
I currently have two SQL commands. One retrieves a list of unique IDs from
I currently have two Backbone models: user and project. I would like to have

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.