Unfortunately you can't do that with ObjectSelect. SQLSelect of course would
allow to use MySQL functions. So that's probably the way to go here.
Andrus
> On Jun 8, 2016, at 11:07 PM, Frank Herrmann
> wrote:
>
> Hello all,
>
> Is there a way in Cayenne, when adding an ordering to a query, to
Views in mysql do not take advantage of indexes. We would like to avoid
views and would prefer a Cayenne solution. Also, having a view with a
formula is not very efficient, especially when dealing with hundreds of
thousands of records.
-Frank
On Wed, Jun 8, 2016 at 4:42 PM, Adam Boyle wrote:
>
I can't speak to what Cayenne is able to do solely when using an ObjectQuery,
but from a database perspective it sounds like you want to be using a view that
provides the date-only version of your datetime column. Then you could query it
just like a table and do your sort on the date-only column
Hello all,
Is there a way in Cayenne, when adding an ordering to a query, to order by
only the date portion of a timestamp (including time) field? Basically, the
timestamp includes hour, minutes, seconds, etc. I only want to sort on the
date portion (month, day, year), or any other such criteria.