My projects already have the cayenne-java8 dependency, and java.time.* classes
work great with regular queries, i.e. this will work fine:
LocalDateTime creationDate = ObjectSelect
.query( User.class )
.selectFirst( Jambalaya.newContext() )
.creationDate();
Cheers,
- hugi
> On 24 May 2017, at 14:28, Andrus Adamchik <[email protected]> wrote:
>
> You need to add cayenne-java8 dependency.
>
> Unfortunately the fallback behavior (treat unknown class as Serializable) is
> extremely confusing. Though I think we log some warnings before doing that.
>
> ANdrus
>
>
>> On May 24, 2017, at 5:20 PM, Hugi Thordarson <[email protected]> wrote:
>>
>> Hi all,
>> if I try to fetch Java 8 date objects using ColumnSelect, the values get
>> returned as byte arrays instead of actual objects. Example:
>>
>> LocalDateTime creationDate = ObjectSelect
>> .query( User.class )
>> .column( User.CREATION_DATE )
>> .selectFirst( Jambalaya.newContext() );
>>
>> User.creationDate() is a LocalDateTime—but the fetch will fail since the
>> returned value is a byte array.
>>
>> Bug?
>>
>> Cheers,
>> - hugi
>