cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gmail <tgiacc...@gmail.com>
Subject Re: Reverse engineering and dates
Date Sun, 26 Jun 2016 20:47:09 GMT
There are a lot of project using something other than the traditional Java Date.

Tony Giaccone

> On Jun 25, 2016, at 5:30 PM, Andrus Adamchik <andrus@objectstyle.org> wrote:
> 
> I wonder if instead of (in addition to) Joda preferences, we add a single preference
- "Java 8", and if that's on use the new Java 8 date/time types that were all influenced by
Joda. Thoughts?
> 
> Andrus
> 
>> On Jun 22, 2016, at 2:01 PM, Anthony Giaccone <anthony.giaccone@nytimes.com>
wrote:
>> 
>> Yeah,
>> 
>> I have an existing schema and it’s something of a mess, and were using git, so
different branches have different schemas with different attributes.  So I’m re-engineering
a lot. 
>> 
>> I did what you suggested the first three times but then I was like. "Meh, there should
be a better way….”
>> 
>> 
>> Maybe something as simple as a preferences page which specifies what class to use
for the basic mappings?  Or maybe even easier, “Joda Time” and a check box. 
>> 
>> 
>> 
>> Tony
>> 
>> 
>> I’m also changing a bunch of lookup tables that curren
>> 
>>> On Jun 22, 2016, at 12:19 PM, John Huss <johnthuss@gmail.com> wrote:
>>> 
>>> If this is a one-time task, just open up the cayenne-*.map.xml file in a
>>> text editor and do a Find and Replace All of "java.util.Date" with
>>> "org.joda.time.DateTime".
>>> 
>>> 
>>>> On Wed, Jun 22, 2016 at 11:06 AM Tony Giaccone <tgiaccone@gmail.com>
wrote:
>>>> 
>>>> When reverse engineering a database, the java.util.Date class is used in
>>>> all the classes that reference timestamps. Is there a way to get this to
>>>> default to another class?  I'd like to use Joda's org.joda.time.DateTime
>>>> instead.
>>>> 
>>>> Is there an easy way to swap this out when the classes get generated?
>>>> 
>>>> 
>>>> 
>>>> Tony
> 

Mime
View raw message