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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:36:10+00:00 2026-05-25T11:36:10+00:00

I have created a small test app. It creates a new company and a

  • 0

I have created a small test app. It creates a new company and a number of x employees.

The employees are created in their own thread and as soon as that’s done, they will be added to a company.

Because it’s not allowed to share managed objects between threads, I use the company’s object id.

In order not to read/write the same managed object context at the same time, I create a temporary context for each thread. I use – (void)mergeChanges:(NSNotification *)Notifikation and merge the changes between the man context and the context from the thread.

I display both the company and its employees in two table views using two app controllers and bindings.

But there is still a bug I can’t fix. Everytime I create a new company with employees, not all employees appear in the table view. Somehow they get lost, but I can’t figure out where.

I have uploaded the Xcode project here: http://uploading.com/files/7894m9mc/CoreDataMultiThreading.zip/

I am trying to find the bug for one week now 🙁 Maybe someone else has more luck.

Note: What I want to try with that app is to create many objects in their own thread (employees) and add these objects to one and the same object (company) as soon as they are created.

( please excuse my bad pronunciation )

  • 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-25T11:36:10+00:00Added an answer on May 25, 2026 at 11:36 am

    The problem is arising because many of the Employee objects have their company relationship set to nil after the merge with the foreground thread. Since they have no company relationship object, they don’t show up in the UI.

    I’m not sure why the merge is setting the relationship to nil. It might have something to do with having multiple merges occurring at the same time or with trying to merge unfaulted fault objects.

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

Sidebar

Related Questions

I have created a small application which opens,reads and creates Excel files. The app
I have created a small flash CS4 project that has a few custom components
I have created a small and simple android app. I tried installing it on
I have created a few small flash widgets that stream .mp3 audio from an
I have a program that creates a small file in the Bin directory for
I have a Rails app that processes a large (millions) number of records in
I have created small test web application which makes use of LINQ to SQL.
I have created a small test page using Sencha Touch , OpenLayers and I
I have created a small test for updating table using Linq-to-SQL DataContext as follows:
I have created a small daemon (basically a console application that hides the console

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.