Re: Uniquing data in Core Data

2013-08-15 Thread Sandor Szatmari
Can you make it a derived property? If each Managed object has a reference to the AppDelegate they can just return the comparison of their NSManagedObjectID to the one stored as the user default. Sandor Szatmari On Aug 15, 2013, at 1:07, Rick Mann rm...@latencyzero.com wrote: On Aug 14,

Re: Uniquing data in Core Data

2013-08-15 Thread Rick Mann
Doesn't work for sorting in NSFetchedresultsController On Aug 15, 2013, at 16:34 , Sandor Szatmari admin.szatmari@gmail.com wrote: Can you make it a derived property? If each Managed object has a reference to the AppDelegate they can just return the comparison of their

Uniquing data in Core Data

2013-08-14 Thread Rick Mann
I have a boolean property on an Entity for which only one should ever be true. Is it really bad to implement a custom setter that loads every other instance in the MOC that's true and sets them all to false? My code is actually good about always clearing the current one before setting the new

Re: Uniquing data in Core Data

2013-08-14 Thread Keary Suska
On Aug 14, 2013, at 6:28 PM, Rick Mann wrote: I have a boolean property on an Entity for which only one should ever be true. Is it really bad to implement a custom setter that loads every other instance in the MOC that's true and sets them all to false? My code is actually good about

Re: Uniquing data in Core Data

2013-08-14 Thread Jerry Krinock
On 2013 Aug 14, at 20:46, Keary Suska cocoa-...@esoteritech.com wrote: A cleaner approach, IMHO, is to have a holder entity whose sole attribute is a to-one relationship to your other entity. Think of it as a singleton that always exist and maintains the particular managed object. Indeed

Re: Uniquing data in Core Data

2013-08-14 Thread Rick Mann
On Aug 14, 2013, at 21:14 , Jerry Krinock je...@ieee.org wrote: On 2013 Aug 14, at 20:46, Keary Suska cocoa-...@esoteritech.com wrote: A cleaner approach, IMHO, is to have a holder entity whose sole attribute is a to-one relationship to your other entity. Think of it as a singleton that