cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugi Thordarson <h...@karlmenn.is>
Subject Re: Controlling data types in result when performing SQLTemplate queries
Date Tue, 16 Aug 2016 11:57:36 GMT
Works like a charm, thanks!

- hugi



> On 16. ágú. 2016, at 11:46, Andrus Adamchik <andrus@objectstyle.org> wrote:
> 
> 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