Hi there!
Perhaps an unusual case but one I ran into today:

If I have a Postgres UDT ('MyUdt') that contains a field mapped with a 
custom JOOQ binding (like a hstore or json field as mentioned here: 
http://www.jooq.org/doc/3.8/manual/code-generation/custom-data-type-bindings/) 
and that UDT is used to form an array field ('MyUdt[]') on another table, 
then JOOQ fails to generate the correct SQL to insert into that array of 
UDTs.

The code being triggered when binding the provided value to the SQL 
statement is in DefaultBinding.java:1108:

else if (actualType.isArray()) {
    switch (dialect.family()) {
        case POSTGRES: {
            ctx.statement().setString(ctx.index(), toPGArrayString((Object[]) 
value));
            break;
        }


The calls below toPGArrayString assume the object and it's fields are 
either JOOQ records or basic types that can be mapped with toString().  At 
this point, the fact that a field on the object in the array has a custom 
binding is not considered.

Using: Postgres 9.5.3, Jooq 3.8.1

Since this is quite likely a corner case experienced by only a few I'm not 
anticipating a fix soon - I'm planning to rework my schema and continue on 
for now (rather than even make a patch).

Thanks for any input,

Leigh

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