MariaDB LocalDate field casting issue

2017-04-29 Thread Andrew Willerding
Hi, I'm having an issue using a LocalDate field in my MariaDB table. I'm using mysql Ver 15.1 Distrib 10.0.30-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 The table is defined as the following... db-attribute-path="defaultTimeZone"/> db-attribute-path="expireDate"/> db-attribu

Re: Raw query

2017-04-29 Thread Amedeo Mantica
thank you so much ! Amedeo > On 29 Apr 2017, at 16:22, Nikita Timofeev wrote: > > Hi Amedeo, > > For raw queries you can use SQLTemplate, like this: > > SQLTemplate query = new SQLTemplate(MyEntity.class, "SELECT COUNT(1) > FROM MY_ENTITY"); > query.setFetchingDataRows(true); > List rows = (L

Re: Raw query

2017-04-29 Thread Nikita Timofeev
Hi Amedeo, For raw queries you can use SQLTemplate, like this: SQLTemplate query = new SQLTemplate(MyEntity.class, "SELECT COUNT(1) FROM MY_ENTITY"); query.setFetchingDataRows(true); List rows = (List) context.performQuery(query); You can also use aggregate functions directly with Cayenne API (s

Raw query

2017-04-29 Thread Amedeo Mantica
Hi all, Ho to execute a simple raw query with cayenne ? let say: SELECT COUNT(1) FROM MY_ENTITY; Thank you Amedeo