Thu, 17 Jul 2008 08:56:23 -0600
> To: "Cocoa-Dev (Apple)"
> Conversation: Sorting a to-many relationship property
> Subject: Re: Sorting a to-many relationship property
>
> 7/16/08 6:37 PM, also sprach [EMAIL PROTECTED]:
>
>> I have a couple entities related b
7/16/08 6:37 PM, also sprach [EMAIL PROTECTED]:
> I have a couple entities related by a to-many relationship. Entity Foo
> can have 0..N of Entity Bar. I have a relationship defined on Foo
> named "bars". In my code, I build a comma-delimited string of Bars by
> iterating over the NSArray* returne
On Jul 16, 2008, at 17:51:30, I. Savant wrote:
You'll need to sort them yourself after you get them if you're
directly getting them via -valueForKeyPath: since there's no way to
specify a sort descriptor at that time. NSArray conveniently has a
method for exactly that purpose.
I realiz
But they come back in whatever order Core Data has for them. I'd
really like for all requests for Foo.bars to come back sorted by a
property of Bar. Is this possible? Or must I either create a new
property that sorts them, or just sort them after I get them?
You'll need to sort them yours
I have a couple entities related by a to-many relationship. Entity Foo
can have 0..N of Entity Bar. I have a relationship defined on Foo
named "bars". In my code, I build a comma-delimited string of Bars by
iterating over the NSArray* returned by Foo.bars.
But they come back in whatever ord