Sorting of a to-many relation by eo?
Susanne Schneider <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi guys,
I hope this is easy to answer, but I need to get certainty about this:
This is my scenario:
Entity A <-->> Entity B --> Entity C, with the relations "toBs" (A-->>B)
and "toC" (B-->C). All primary and foreign keys are no class properties.
As I have allready tested it is possible to implement a sorted array for
the to-many relation from A to B like this:
public NSArray sortedToBs() {
EOSortOrdering sortB = new EOSortOrdering("toC",
EOSortOrdering.CompareAscending);
return EOSortOrdering.sortedArrayUsingKeyOrderArray(toBs(), new
NSArray(sortB);
}
What does EOF do with this kind of sorting? Does that mean that the
array of Bs is sorted by the foreign keys of C? That would match my
requirements, otherwise I have to make the foreign key a class property
to sort by. Or is that the better way anyway?
Thanks in advance,
Susanne
--
Susanne Schneider
Coordinator secuSuite Development
iAS interActive Systems GmbH
Dieffenbachstraße 33 c, D-10967 Berlin
fon +49(0)30 69 00 42 - 05
fax +49(0)30 69 00 42 - 10
mail [email protected]
web http://www.interActive-Systems.de
----------------------------------------------------
Geschäftsführer: Dr. Marko Reschke, Thomas Fritzsche
Sitz der Gesellschaft: Berlin
Amtsgericht Berlin Charlottenburg, HRB 106103B
----------------------------------------------------