You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Lon Varscsak <lo...@gmail.com> on 2021/02/03 06:04:16 UTC

SQLTemplate date types

Is there any way to change the default date types that get returned by
SQLTemplate queries to use java.time classes instead of Date?

I know I can specify it for specific queries (#result), but I want to
change them for the whole application.

Thanks,

Lon

Re: SQLTemplate date types

Posted by Lon Varscsak <lo...@gmail.com>.
I dug a little deeper and wondered if it was possible to override the type
at the Adapter level, but haven't gotten very far. :P

On Tue, Feb 2, 2021 at 11:12 PM Andrus Adamchik <an...@objectstyle.org>
wrote:

> Not currently, but I think we must implement it in some way. I can't
> imagine anyone still wanting to deal with java.sql.Timestamp.
>
> Andrus
>
> > On Feb 3, 2021, at 9:04 AM, Lon Varscsak <lo...@gmail.com> wrote:
> >
> > Is there any way to change the default date types that get returned by
> > SQLTemplate queries to use java.time classes instead of Date?
> >
> > I know I can specify it for specific queries (#result), but I want to
> > change them for the whole application.
> >
> > Thanks,
> >
> > Lon
>
>

Re: SQLTemplate date types

Posted by Andrus Adamchik <an...@objectstyle.org>.
Not currently, but I think we must implement it in some way. I can't imagine anyone still wanting to deal with java.sql.Timestamp.

Andrus

> On Feb 3, 2021, at 9:04 AM, Lon Varscsak <lo...@gmail.com> wrote:
> 
> Is there any way to change the default date types that get returned by
> SQLTemplate queries to use java.time classes instead of Date?
> 
> I know I can specify it for specific queries (#result), but I want to
> change them for the whole application.
> 
> Thanks,
> 
> Lon