I can make it better. I already found the problem:
in org.jooq.util.AbstractTypedElementDefinition we have the following code:

static DataTypeDefinition mapDefinedType(Definition container, Definition
child, DataTypeDefinition definedType) {
        ...
        ForcedType forcedType = db.getConfiguredForcedType(child);
        if (forcedType != null) {
        ...
        result = new DefaultDataTypeDefinition(...);
        ...
        }

        if (db.dateAsTimestamp()) {
        ...
        result = new DefaultDataTypeDefinition(...);
        ...
        }

So, if the "dateAsTimestamp" is true, the data type generated by the forced
type is always overwritten.


Estevão de Freitas Góes
------------------------------------
Analista de Sistemas
Bel. Ciências da Computação (UFMA 2010)


2013/4/12 Lukas Eder <[email protected]>

> Hi Estevão,
>
> Could you provide a self-contained example of how to reproduce the
> issue you're experiencing?
>
> Cheers
> Lukas
>
> 2013/4/12 Estevão Góes <[email protected]>:
> > By the way, I discovered we can't use forced types with
> "java.sql.Timestamp"
> > when using "<dateAsTimestamp>true</dateAsTimestamp>". This configuration
> > always use timestamp type and mess up generated code.
> >
> >
> > Em segunda-feira, 8 de abril de 2013 17h30min00s UTC-3, Estevão Góes
> > escreveu:
> >>
> >> Hi everybody,
> >> I just wanna convert all columns with java.sql.Timestamp type to
> >> java.util.Date.
> >> This article (http://www.jooq.org/manual/ADVANCED/CustomTypes/) uses
> the
> >> column name, I want to use the column type.
> >
> > --
> > 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.
>
>
>

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