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 630277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:50:16+00:00 2026-05-13T19:50:16+00:00

I have the following error while trying to call the save method on managedObjectContext.

  • 0

I have the following error while trying to call the save method on managedObjectContext.

#0  0x939214e6 in objc_exception_throw
#1  0x01ded83b in -[NSObject doesNotRecognizeSelector:]
#2  0x01d84676 in ___forwarding___
#3  0x01d606c2 in __forwarding_prep_0___
#4  0x01c618b6 in -[NSFetchedResultsController(PrivateMethods) _managedObjectContextDidChange:]
#5  0x0003263a in _nsnote_callback
#6  0x01d4f005 in _CFXNotificationPostNotification
#7  0x0002fef0 in -[NSNotificationCenter postNotificationName:object:userInfo:]
#8  0x01bc217d in -[NSManagedObjectContext(_NSInternalNotificationHandling)     _postObjectsDidChangeNotificationWithUserInfo:]
#9  0x01c21763 in -[NSManagedObjectContext(_NSInternalChangeProcessing) _createAndPostChangeNotification:withDeletions:withUpdates:withRefreshes:]
#10 0x01ba65ea in -[NSManagedObjectContext(_NSInternalChangeProcessing) _processRecentChanges:]
#11 0x01bdc728 in -[NSManagedObjectContext save:]
  • I did some changes to the OrderItem entity before coming to this following code, where I want to cancel any insertion to OrderItem

    NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
    [fetchRequest setEntity:[NSEntityDescription entityForName:@"OrderItem" inManagedObjectContext:managedObjectContext]];
    NSArray *deleteItems = [managedObjectContext executeFetchRequest:fetchRequest error:&error];
    for (id item in deleteItems)
        [managedObjectContext deleteObject:item];
    
    if (![managedObjectContext save:&error]){
        NSLog(@"deleting OrderItem failed: %@, %@", error, [error userInfo]);
        return FALSE;
    }
    

The error occurs on the line [managedObjectContext save:&error] without going to the NSLog but raises an exception.

What am I doing wrong? Someone show me how, please?

  • 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-13T19:50:17+00:00Added an answer on May 13, 2026 at 7:50 pm

    I have the complex schema in my .xcdatamodel in which the OrderItem has two relationships with the DeleteRule be set to Nullify.

    Temporarily change to “No Action” solves the error even though it raises some warnings, but personally I think, xCode should not behave that way. It should populate the values to &error to let me know I have problems with my schema.

    Any thoughts about this?

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

Sidebar

Related Questions

I have done simple java app for blackberry, while building am getting following error.
I have the following error Exception in thread main javax.naming.NameNotFoundException: CounterBean not bound trying
I'm trying to install memcached-1.2.8-repcached-2.2.1 I have the following error after running make :
While trying to debug a Phonegap error message (Call to OpenGL ES api with
I'm having a problem while trying to call a custom Model method from my
I use wcsncasecmp inside c/c++ app. Compile have following error: error: 'wcsncasecmp' was not
I have the following error with my ASP.NET web site. I have just moved
I have the following error: LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
I have the following error message: SQLSTATE[HY000] [2003] Can't connect to MySQL server on
I have the following error when I try to compile my code in g+

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.