Core data, sorting one-to-many child objects
Posted
by Shizam
on Stack Overflow
See other posts from Stack Overflow
or by Shizam
Published on 2010-03-26T15:11:56Z
Indexed on
2010/03/26
15:13 UTC
Read the original article
Hit count: 337
So if I have a store of parents children and the parent has a one to many relationship to children (parent.children) and they all have first names. Now, on the initial fetch for parents I can specify a sort descriptor to get them back in order of first name but how can I request the children in order? If I do a [parent.children allObjects] it just gives them back in a jumble and I'd have to sort after the fact, every time.
Thanks, Sam
© Stack Overflow or respective owner