Thanks, 

If you modify documentation, you should also document what matches 
the<expression>: is it COLUMN or TABLE.COLUMN or SCHEMA.TABLE.COLUMN? and 
indicate this case sensitivity.

Is the SQL type returned (and matched by <types>), normalized (as described 
in java.sql.Types) or database specific?

Moreover, to figure out why my <forcedType> rule didn't apply, I had to 
override the JavaGenerator.getType method to introduce a log of type 
definition. This is why I still dream of being able to implement my own 
function (column definition) --> Java type. This is only my personal 
feeling on customising Java types in code generator, at the end it does the 
job. Thanks

Gérald

Le mardi 25 mars 2014 17:02:16 UTC+1, Lukas Eder a écrit :
>
>
>
>
> 2014-03-25 16:59 GMT+01:00 Lukas Eder <[email protected] <javascript:>>:
>
>> Hi Gérald
>>
>> 2014-03-23 14:28 GMT+01:00 Gérald Quintana <[email protected]<javascript:>
>> >:
>>
>> I found the solution by myself, the <expression> is case sensitive and is 
>>> lower case in MySQL,
>>>                             <forcedTypes>
>>>                                 <forcedType>
>>>                                     <name>java.util.Date</name>
>>>                                     
>>> <expression>.*last_update</expression>
>>>                                     <types>timestamp|date</types>
>>>                                 </forcedType>
>>>                             </forcedTypes>
>>>
>>
>> Glad it worked out for you. Yes, <expression> is case-sensitive as it is 
>> a Java regular expression. To create case-insensitive regular expressions, 
>> use
>>
>> (?i:...)
>>
>>  
>> By default, everything in jOOQ is case-sensitive because that's the only 
>> sane way to handle SQL case-sensitivity.
>>  
>> What kind of values does the <types> match? I tried 
>>> "java\.sql\.Timestamp" before finding out it was "timestamp".
>>>
>>
>> The SQL data type (not the Java data type) as reported by your database. 
>> In the case of MySQL, this is what is reported by 
>> INFORMATION_SCHEMA.COLUMNS.DATA_TYPE
>>
>
> I realise that this part of the manual merits some more detailed 
> documentation. I have registered an issue for this #3155:
> https://github.com/jOOQ/jOOQ/issues/3155 
>
> Cheers
> Lukas
>

-- 
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