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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:15:51+00:00 2026-06-01T09:15:51+00:00

I am not sure what I’m missing here so I’ll try to explain a

  • 0

I am not sure what I’m missing here so I’ll try to explain a problem I’m having.

I have two nsmanagedobjectcontexts. I will call them A and B.

  1. I insert a new entity E in A
  2. I save A
  3. from B I try to fetch all the E entities found in store with a simple fetchRequest
  4. When executing the NSFetchRequest to get all E entities from B I cannot get the one I inserted in A even though A was saved.
  5. I can get E if I execute the NSFetchRequest against A.

I thought that once I save a context the ManagedObject in that context would get saved to the persistent store (I only have one persistent store setup). So then I thought that I could get the managed object E from what ever context I wanted since any NSFetchedRequest fetches from the persistent store into the context I’m executing it on.

What am I missing here? Why can’t I get E from any context I want after saving context A in which E was inserted in in the first place?

  • 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-01T09:15:53+00:00Added an answer on June 1, 2026 at 9:15 am

    You need to merge the changes from context A in to context B. or instantiate context B after the save of context A.

    Take a look at the documentation for mergeChangesFromContextDidSaveNotification on NSManagedObjectContext.

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

Sidebar

Related Questions

not sure what i'm missing, but here ti go's: i have a floating left
Not sure what's going on here. I have a DateTime object, and when I
Not sure if the derived page is actually relevant to the problem here, but
Not sure what I'm missing here but this code runs without any error message,
Not sure if I've worded my title correctly but here goes. I have a
Not sure how to frame this one, so here goes... I have a need
Not sure what exactly is going on here, but seems like in .NET 1.1
Not sure why but I am not getting anything back from the json call.
Not sure what's going on here, but in my Rails 3 application, I type
Not sure if these two can be compared, to bear with me. But what

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.