Hi!

Second posting, the other was swallowed by Google.

We wrote a converter that is supposed to convert java.sql.Date to Joda's 
DateTime during code generation.
We followed the example posted on the jOOQ website (GregorianCalendar).

But we run into problems:

We configured the converter like this:

     <customTypes>
>         <customType>
>           <name>JodaDateTime</name>
>           <type>org.joda.time.DateTime</type>
>           <converter><package to converter>.DateTimeConverter</converter>
>         </customType>
>       </customTypes>
>       <forcedTypes>
>         <forcedType>
>           <!-- Specify any data type from org.jooq.impl.SQLDataType -->
>           <name>DECIMAL</name>
>           <types>NUMBER.*|INTEGER</types>
>         </forcedType>
>         <!-- SQL Date to DateTime -->
>         <forcedType>
>           <name>JodaDateTime</name>
>           <types>DATE</types>
>         </forcedType>
>       </forcedTypes>



But we get exceptions during creation:

[javac] 
>> E:\oracle\jenkins\workspaces\Services_HEAD_DBAccess_All\generated\...\Getnextaccitemoverview.java:49:
>>  
>> incompatible types
>
> [javac] found : org.jooq.Parameter<java.sql.Date>
>
> [javac] required: org.jooq.Parameter<org.joda.time.DateTime> 
>
> [javac] public static final org.jooq.Parameter<org.joda.time.DateTime> 
>> P_VALID_TO_DATE = createParameter("P_VALID_TO_DATE", 
>> org.jooq.impl.SQLDataType.DATE); 
>
>
>>
>> or:
>
>
>> [javac] 
>> E:\oracle\jenkins\workspaces\Services_HEAD_DBAccess_All\generated\...\XdsQueryParams.java:52:
>>  
>> incompatible types
>
> [javac] found : org.jooq.UDTField<....XdsQueryParamsRecord,java.sql.Date>
>
> [javac] required: 
>> org.jooq.UDTField<....XdsQueryParamsRecord,org.joda.time.DateTime>
>
> [javac] public static final org.jooq.UDTField<.....XdsQueryParamsRecord, 
>> org.joda.time.DateTime> CREATIONTIMETO = createField("CREATIONTIMETO", 
>> org.jooq.impl.SQLDataType.DATE, XDS_QUERY_PARAMS);
>
>
 
What are we doing wrong? Using a snapshot 3.5.0 generator.

Sascha 


-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to