On Sat, Jul 31, 2010 at 8:22 PM, Martin Stanley <r...@thinkingventures.com> 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com