Re: Core Data and ordered to-many relations

2009-05-24 Thread Kevin Gessner
On May 25, 2009, at 12:15 AM, Kelvin Chung wrote: Is there a way to represent an ordered to-many relation? It sounds like you need Brain Webster's BWOrderedManagedObject: http://www.fatcatsoftware.com/blog/2008/per-object-ordered-relationships-using-core-data It adds mutableOrderedValueForKe

Re: Core Data and ordered to-many relations

2009-05-24 Thread jmunson
Didn't the OP want the relatives joined in a specific order (or, at least, be able to retrieve them in a specific order)? "in the order prescribed." To do that, joins alone won't satisfy his query (Core Data structures are not guaranteed to return in any order). As I read them, his option

Re: Core Data and ordered to-many relations

2009-05-24 Thread Jerry Krinock
If there's only two relatives, as in your example, use two to-one relationships. If there's an indeterminate number, you can add an intermediate "joiner" entity, as explained here: http://www.cocoabuilder.com/archive/message/cocoa/2007/9/16/189293 The above joins between two different enti

Core Data and ordered to-many relations

2009-05-24 Thread Kelvin Chung
Is there a way to represent an ordered to-many relation? For example, suppose you have an entity, Person, related to itself (one-to-many). Now suppose Alice is related to Carol and Dave, and Bob is related to Dave and Carol, in the order prescribed. Is there a way to model that using a re