Re: @size in ObjectSelect.orderBy()

2024-07-27 Thread Andrus Adamchik
Wow, what do you know. Looking at the history, I committed this in 2010 and forgot about it since :) IIRC this was an abandoned experiment that only works for returning the size during in-memory evaluation, but is otherwise ignored. Glad Cayenne works for you otherwise! Andrus > On Jul 27, 20

Re: @size in ObjectSelect.orderBy()

2024-07-27 Thread Riccardo De Menna
Hi Andrus, Ok, I was fooled by the presence of this: > public class Cayenne { > > /** > * A special property denoting a size of the to-many collection, when > * encountered at the end of the path > */ > final static String PROPERTY_COLLECTION_SIZE = "@size"; In Cayenne’s

Re: @size in ObjectSelect.orderBy()

2024-07-27 Thread Andrus Adamchik
No. Unlike EOF, "@size" is not a keyword with any meaning in Cayenne. Andrus > On Jul 27, 2024, at 2:38 PM, Riccardo De Menna wrote: > > Can I use the @size keyword to sort a ToMany relationship in the backend with > ObjectSelect.orderBy() ? > > I’m getting: > > java.lang.IllegalStateExceptio

@size in ObjectSelect.orderBy()

2024-07-27 Thread Riccardo De Menna
Can I use the @size keyword to sort a ToMany relationship in the backend with ObjectSelect.orderBy() ? I’m getting: java.lang.IllegalStateException: Unable to resolve path: compositions (unknown '@size' component) at org.apache.cayenne.access.translator.select.ObjPathProcessor.processNo