cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Controlling data types in result when performing SQLTemplate queries
Date Tue, 16 Aug 2016 11:46:58 GMT
Yeah, with #result directive. The downside is that if you start using it in a given query,
you must apply it to every column.

http://cayenne.apache.org/docs/4.0/cayenne-guide/queries.html#sqltemplate

Andrus

> On Aug 16, 2016, at 2:36 PM, Hugi Thordarson <hugi@karlmenn.is> wrote:
> 
> Hi all,
> 
> Currently when I run SQLTemplate queries that fetch columns of the type “DATE” and
“TIME”, results are always mapped to java.util.Date. I’d love to be able to map them
to LocalDate and LocalTime (as they’re mapped in my ObjEntities). Can I change how SQLTemplate
maps these columns to java types?
> 
> Cheers,
> - hugi
> 
> // Hugi Thordarson
> // http://www.loftfar.is/
> // s. 895-6688
> 
> 
> 


Mime
View raw message