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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:50:52+00:00 2026-06-16T22:50:52+00:00

I have a one (troop) to many (members) relationship using core data. I can

  • 0

I have a one (troop) to many (members) relationship using core data. I can successfully add and delete to the troops.

Once troops are created, when I click on a troop from a tableview, it loads a new table of members of that troop. I can successfully add to the members table with correct troop as the parent. Using NSLog, I can see that the member is added. However, the members table does not reload and the new member does not save until I go back and add a new troop. It seems like the only time the context actually saves is when a new troop is added. When a new troop is added, all of the added members will then appear under their correct troops. Completely closing and relaunching the app does not force the member to be saved.

I have tried adding both of these to the insert method:

[self.managedObjectContext save:nil];
[self.managedObjectContext refreshObject:newManagedObject mergeChanges:YES];

I have added this to the controllerDidChangeContent

 [self.managedObjectContext save:nil];
 [self.tableView reloadData];
 [[NSNotificationCenter defaultCenter] postNotificationName:@"ContextDidSave" object:self.managedObjectContext];

I have added this to the contextDidSave method:

[self.managedObjectContext mergeChangesFromContextDidSaveNotification:notification];

I have added this to the viewWillAppear method:

   [self.tableView reloadData];

And this to the viewDidLoad method:

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(contextDidSave:)
                                             name:@"ContextDidSave" object:nil];

I am sure there is something missing or reason why it is not saving. I have also used all of the delegates.

<NSFetchedResultsControllerDelegate, UINavigationControllerDelegate, UITableViewDelegate, UITableViewDataSource>

I have tried every example or suggestion I can find in stackoverflow. I hope someone has new suggestions. Thanks!

  • 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-16T22:50:54+00:00Added an answer on June 16, 2026 at 10:50 pm

    From my comment

    Did you set the delegate for you NSFetchedResultsController?

    fetchedController.delegate = self;

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

Sidebar

Related Questions

Have one Doubt In MVC Architecture we can able to pass data from Controller
I have one view page (MyView.aspx) and many data sources to bind on this
I have one Listbox and a List of data I want to bind the
I have one long excel sheet with books details of a library..can i import
I have one database which contains username, password and IsActive (data type is bit)
I have one method that receives a Stream to write on it using a
Have one application in SVN (on unfuddle.com). Want to add a new application (related
I have one Python module that can be called by a CGI script (passing
I have one costly function that gets called many times and there is a
I have one million rows of data in .txt format. the format is very

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.