Well, I sort dynamically on different properties so an explicit
sortIndex wouldn't be ideal. But the lack of normalization just might
work. I could create a boolean field which basically acts as
'hasProperty'. I can then hook into -willSave of the NSManagedObject
to set that to YES or NO appropriately. This would give me an easy
sort that the database should be able to handle just fine.

Thanks,
Sebastian


On Wed, Aug 19, 2009 at 11:06 AM, Kyle Sluder<kyle.slu...@gmail.com> wrote:
> You're going to need to do an in-memory sort of these objects.  Your
> suspicions about Core Data sorting are correct: when using the SQLite
> store, it sends the sorting off to the database backend, where it's
> far more efficient to do.
>
> Have you thought instead of sorting on a dependent property of your
> objects?  Maybe create an integer property sortIndex that is updated
> when other properties are updated.  This is where you need to shut up
> the part of your brain that complains about normalization.  :)
>
> --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

Reply via email to