• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Core-Data Multithreading question about save
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core-Data Multithreading question about save


  • Subject: Re: Core-Data Multithreading question about save
  • From: Dex Morgan <email@hidden>
  • Date: Thu, 22 May 2008 00:36:03 +0200


Il giorno 22/mag/08, alle ore 00:18, Hamish Allan ha scritto:

Not sure I understand your question, but if you need to differentiate
between objects inserted before some point in time and objects
inserted afterwards, you can explicitly model a timestamp in a managed
object subclass. See e.g.,
http://developer.apple.com/cocoa/coredatatutorial/index.html, movie

I'll try to explain it better.
Suppose an existing persistent store with some objects inside.
When you open the app you can see these objects from the main managedobjectcontext.
Now suppose you have a thread that will put in backgrounds lots of objects.
The programs itself store each object inside another managedobjectcontext (linked to the same persistent store) and then search for an object (we call it the parent of this object) to make a relationship.
This link actions happend in the main thread (so inside the main object context) and the app can't see objects inserted into the second managedobject until I perform a -save: to it.
However it seems to be a damn expensive operation (a save for each inserted object I mean) and I think it's not the right way to perform my target.
Hope it is clear.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Core-Data Multithreading question about save
      • From: "Hamish Allan" <email@hidden>
References: 
 >Core-Data Multithreading question about save (From: Dex Morgan <email@hidden>)
 >Re: Core-Data Multithreading question about save (From: "Hamish Allan" <email@hidden>)

  • Prev by Date: Re: Core-Data Multithreading question about save
  • Next by Date: Re: Scrolling NSStatusBar
  • Previous by thread: Re: Core-Data Multithreading question about save
  • Next by thread: Re: Core-Data Multithreading question about save
  • Index(es):
    • Date
    • Thread