This could be a bug. What jOOQ version are you using? Could you provide me
with the DDL for the myschema.table?

Cheers
Lukas


2013/10/8 <[email protected]>

> Hi,
>
> I'm having a problem where if I configure forcedTypes, the field type is
> set correctly, but the associated converter is not applied.
>
> Here is my configuration:
>
>   <generator>
>     <database>
>       <name>org.jooq.util.postgres.PostgresDatabase</name>
>       <includes>.*</includes>
>       <excludes></excludes>
>       <inputSchema>myschema</inputSchema>
>       <customTypes>
>         <customType>
>           <name>com.fasterxml.jackson.databind.node.ObjectNode</name>
>           <converter>com.mystuff.JsonConverter</converter>
>         </customType>
>       </customTypes>
>       <forcedTypes>
>         <forcedType>
>           <name>com.fasterxml.jackson.databind.node.ObjectNode</name>
>
> <expressions>myschema\.table\.foo|myschema\.table\.bar</expressions>
>         </forcedType>
>       </forcedTypes>
>     </database>
>     <strategy><name>com.mystuff.PrefixGeneratorStrategy</name></strategy>
>     <generate>
>       <records>false</records>
>     </generate>
>     <target>
>       <packageName>com.mystuff.sql</packageName>
>       <directory>src/</directory>
>     </target>
>   </generator>
>
> The fields are generated thusly:
>
>     public final org.jooq.TableField<org.jooq.Record,
> com.fasterxml.jackson.databind.node.ObjectNode> FOO = createField("foo",
> org.jooq.impl.DefaultDataType.getDefaultDataType("json"), this);
>
> Which, of course, doesn't compile. I have to manually add the 
> .asConvertedDataType(new
> JsonConverter())
>
> What am I doing wrong?
>
> Thanks,
> Dmitri
>
> --
> 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