• 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 fetch and multithreading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core data fetch and multithreading


  • Subject: Re: Core data fetch and multithreading
  • From: vincent habchi <email@hidden>
  • Date: Sun, 21 Nov 2010 21:50:22 +0100

Le 21 nov. 2010 à 21:39, Quincey Morris a écrit :

> It's not an ivar, it's a property.

You're perfectly right.

> You can't modify a NSSet. I suspect you mean "modify this relationship", but the ambiguity leads me to wonder if you're trying to do something funky here. Not that it's relevant to your actual question ...

I mean that I replace an entity in the set, so I add one new entity and I remove an old one via the appropriate mutators (-addEntityObject, -removeEntityObject).

> under the heading "General Guidelines". If I understand your scenario correctly, you've been using approach #3, the one labeled "This approach is strongly discouraged".

Exactly, that's why I want to change. Note that my needs are fairly basic, so I didn't see the point of entering into a more complex scheme.

> Use approach #1 (except in the unlikely case that performance is an issue without full concurrency, in which case use approach #2).

I know I should have two MOCs, but that leads to further difficulties linked to mutator use. I see fairly clearly how to get a copy of the root entity (the one that has the NSSet *), but how about the entities at the other end of the relationship? Should I enumerate all those to get copies, and then perform the mutation on the copies? Can I directly mutate the set from the root copy object without making this expensive copying operation? Is the change immediately reflected in the other MOC (I need real time interaction), etc.

Thanks for answering, have a nice Sunday!
Vincent_______________________________________________

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 fetch and multithreading
      • From: Quincey Morris <email@hidden>
References: 
 >Core data fetch and multithreading (From: vincent habchi <email@hidden>)
 >Re: Core data fetch and multithreading (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Core data fetch and multithreading
  • Next by Date: Re: Core data fetch and multithreading
  • Previous by thread: Re: Core data fetch and multithreading
  • Next by thread: Re: Core data fetch and multithreading
  • Index(es):
    • Date
    • Thread