Yes, you're right. I've tried and it doesn't work on 3.1-SNAPSHOT either.
The code generator cannot "shake off" the precision and scale information
from the original type contained in the database. Forcing the type to
NUMBER(20) doesn't work either as the additional precision information is
ignored by the code generator.

I have registered #2486 for jOOQ 3.1 to fix this:
https://github.com/jOOQ/jOOQ/issues/2486

This should allow to rewrite a type to a specific other type using optional
precision, scale, and length information. For instance:

<forcedType>
    <name>NUMBER(20)</name>
    <expressions>(?i:(.*?.)?T_AUTHOR.ID)</expressions></forcedType>


In the mean time, I'm afraid that you would have to patch
AbstractTypedElementDefinition yourself to fix this problem.

Cheers
Lukas



2013/5/24 venkatesha murthy <[email protected]>

> Hi Lukas
>
> I missed sying that iam using jooq-2.6.1
>
> thanx
> murthy
>
>
> On Fri, May 24, 2013 at 11:33 PM, venkatesha murthy <
> [email protected]> wrote:
>
>> Thanks Lucas for the response
>>
>> However i needed to force BigDecimal (i.e NUMERIC) upon a column called
>> DAY_KEY which is a part of table say IP_AGGR.
>> As its a NUMBER(8) in oracle its always becoming Integer even with the
>> above suggested forcedType as used below.  Please help.
>>
>> <forcedTypes>
>>
>> <forcedType>
>> <name>NUMERIC</name>
>>  <expressions>.*\.DAY_KEY.*</expressions>
>> </forcedType>
>>  </forcedTypes>
>> </database>
>>  <generate>
>> <records>false</records>
>>  </generate>
>>
>> On Friday, May 24, 2013 8:45:43 PM UTC+5:30, venkatesha murthy wrote:
>>>
>>> Hi
>>>
>>> Please help me on how i can a force a perticular data type in java code
>>> generated for a column
>>>
>>> For ex: if the db is oracle 11g and column is COL_X NUMBER(8);
>>> if i need to interpret this as BigDecimal always. {We my change the
>>> precision to 20 or something later nd so i dont want to keep changin the
>>> calling code etc}
>>>
>>> thanks
>>> Murthy
>>>
>>>  --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "jOOQ User Group" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/jooq-user/kdUfWI1DEzQ/unsubscribe?hl=en
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> 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/groups/opt_out.
>
>
>

-- 
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/groups/opt_out.


Reply via email to