cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugi Thordarson <h...@karlmenn.is>
Subject Re: Java 8 Date/Time API and Cayenne
Date Fri, 07 Aug 2015 08:21:43 GMT
Ah, thanks a lot for this! I’ll try it out once M3 is stable and published to central.

Cheers,
- hugi

// Hugi Thordarson
// http://www.loftfar.is/ <http://www.loftfar.is/>
// s. 895-6688



> On 7. ágú. 2015, at 08:17, Savva Kolbachev <s.kolbachev@gmail.com> wrote:
> 
> Yeah. You need to add the following dependency to your pom.xml:
> 
>    <dependency>
>        <groupId>org.apache.cayenne</groupId>
>        <artifactId>cayenne-java8</artifactId>
>        <version>4.0.M3-SNAPSHOT</version>
>    </dependency>
> 
> Note: This is an 4.0.M3-SNAPSHOT version, so mvn repository doesn't contain
> java8 module. You need to build it by yourself.
> 
> Then you need to create new Java8 module and add it to the ServerRuntime.
> For example:
> 
>    Module java8Module = new CayenneJava8Module();
>    ServerRuntime cayenneRuntime = new ServerRuntime("cayenne-project.xml",
> java8Module);
> 
> And the last, don't forget to specify an ObjEntity attribute type as
> java.time.LocalDateTime.
> 
> Hope it will help you.
> 
> 2015-08-06 19:44 GMT+03:00 Hugi Thordarson <hugi@karlmenn.is>:
> 
>> Ah, brilliant, thanks! Do I have to do anything to configure, load or add
>> the module? Just setting the datatype (java.time.LocalDateTime) in the
>> model doesn’t seem to work.
>> 
>> Cheers,
>> - hugi
>> 
>> // Hugi Thordarson
>> // http://www.loftfar.is/ <http://www.loftfar.is/>
>> // s. 895-6688
>> 
>> 
>> 
>>> On 6. ágú. 2015, at 08:58, Savva Kolbachev <s.kolbachev@gmail.com>
>> wrote:
>>> 
>>> Hi Hugi,
>>> 
>>> Cayenne already has a Java 8 module, which includes all necessary
>> extended
>>> types for the new Java 8 Date/Time API.
>>> So feel free to use it.
>>> 
>>> 2015-08-06 11:17 GMT+03:00 Hugi Thordarson <hugi@karlmenn.is>:
>>> 
>>>> Hi all.
>>>> 
>>>> I’m starting new project and I’m pondering using the new Java 8
>> Date/Time
>>>> API’s in the data model. Is anyone using them already with Cayenne, and
>> if
>>>> so, any words of warning (or words of encouragement :)?
>>>> 
>>>> Cheers,
>>>> - hugi
>>>> 
>>>> // Hugi Thordarson
>>>> // http://www.loftfar.is/ <http://www.loftfar.is/>
>>>> // s. 895-6688
>> 
>> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message