• 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: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?


  • Subject: Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?
  • From: Kyle Sluder <email@hidden>
  • Date: Sat, 31 Jul 2010 22:18:02 -0700

On Sat, Jul 31, 2010 at 8:22 PM, Martin Stanley
<email@hidden> wrote:
> I agree that it would be nice to let Core Data handle as much of the referential integrity, etc. as possible; in fact that was why I posed the question in the first place. The problem is that one cannot "convert from NSPredicate instances (for the predicate editor's objectValue) to collections of managed objects that model the predicate" because this would alter the semantics of a SmartGroup significantly. A SmartGroup is meant to have its conditions (predicates) evaluated at runtime (and continuously, at that). But if the predicate is converted to a set of objects at predicate creation/update time this would be impossible.

Not so. You could have entities like SmartGroup, SmartGroupCondition,
SmartGroupEntity, etc. Basically you would be converting an
NSPredicate object to an NSManagedObject object.

But come to think of it, there's no way to specify a relationship to
an entity, rather than to managed objects of that entity. So that
approach is rubbish.

Some model object or controller object should listen for managed
object change notifications and invalidate predicates accordingly.

--Kyle Sluder
_______________________________________________

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

References: 
 >Re: Cocoa-dev Digest, Vol 7, Issue 777 (From: Martin Stanley <email@hidden>)
 >Re: Cocoa-dev Digest, Vol 7, Issue 777 (From: Keary Suska <email@hidden>)
 >Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships? (From: Martin Stanley <email@hidden>)
 >Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships? (From: Kyle Sluder <email@hidden>)
 >Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships? (From: Martin Stanley <email@hidden>)
 >Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships? (From: Kyle Sluder <email@hidden>)
 >Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships? (From: Martin Stanley <email@hidden>)

  • Prev by Date: table header cells not on even lines
  • Next by Date: Re: QTKit Question
  • Previous by thread: Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?
  • Next by thread: UITableViewCell Red Button tap crashes app
  • Index(es):
    • Date
    • Thread