Core Data Fetch Invariance

2009-12-26 Thread Richard Somers
Objects in a persistent store are unordered. If I fetch the objects,  
change nothing in the store, then fetch them again, do the two fetches  
give me the objects in the same order?


--Richard

___

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


Re: Core Data Fetch Invariance

2009-12-26 Thread Bill Bumgarner

On Dec 26, 2009, at 9:38 AM, Richard Somers wrote:

 Objects in a persistent store are unordered. If I fetch the objects, change 
 nothing in the store, then fetch them again, do the two fetches give me the 
 objects in the same order?

Maybe.   Behavior is undefined.

b.bum

___

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


Re: Core Data Fetch Invariance

2009-12-26 Thread Greg Reichow
Your first comment was correct; they are unordered.  The fact that they may 
come back in the same order is not guaranteed by the API.  Therefore, if you 
need ordering, add an attribute to the core data object to do so.

Greg

On Dec 27, 2009, at 1:38 AM, Richard Somers wrote:

 Objects in a persistent store are unordered. If I fetch the objects, change 
 nothing in the store, then fetch them again, do the two fetches give me the 
 objects in the same order?
 
 --Richard
 
 ___
 
 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/gdr3941%40mac.com
 
 This email sent to gdr3...@mac.com

___

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