Hi Andrey,
> Proposal link:
> http://markmail.org/message/6psmcz6zfcb6fj7g
Yes this is exactly what I was thinking of!
"but this will not work for flattened rels. So we'll need either add orderings
for each component of the path (I don't like this way) or add orderings for
DbRels as well:
DbRelationship paintingsArray = ...
paintingsArray.addOrdering(new Ordering("PAINTING_NAME",
SortOrder.ASCENDING)); //notice db attr name
Then Obj rel will automatically pick orderings from underlying Db Rel(s)"
I am not completely following your comment about the flattened relationship.
Howeve, IMHO it seems logical to implement any SelectQuery/SQL customization as
an extension of the DbRelationship (as you comment) and also allow it to be
added via the CayenneModeler (so that webapps with variable entry points will
be supported).
Thanks for your help,
Joe
On Feb 19, 2010, at 3:21 PM, Andrey Razumovsky wrote:
> Proposal link:
> http://markmail.org/message/6psmcz6zfcb6fj7g
>
> 2010/2/19 Andrey Razumovsky <[email protected]>
>
>> Hi,
>>
>> Unfortunately this is not yet supported. See
>> http://issues.apache.org/jira/browse/CAY-477.
>> You'll need to order list every time it is returned (e.g. using
>> Ordering.orderList())
>>
>> 2010/2/19 Joe Baldwin <[email protected]>
>>
>> I need to sort-order a list returned from a to-many relationship. It is
>>> logical that this ordering be applied in all cases.
>>>
>>> Question:
>>> Is there a simple way to apply this by modifying the SelectQuery
>>> associated with the relationship or should I just sort order the list each
>>> time it is returned?
>>>
>>> (If I missed it in the docs please send me a link.)
>>>
>>> Thanks,
>>> Joe
>>>
>>>
>>
>>
>> --
>> Andrey
>>
>
>
>
> --
> Andrey