Hello fellow JOOQers

  I'm having an issue where the SQL being generated fails to execute 
because of type conversion.

I have table with two columns A, B which are NUMERIC

CREATE TABLE my_table (
   id ....pk,
   A numeric(6,3),
   B numeric(6,4)
)


I'm building my SQL query like this

DSLContext d


List<Object> values
...
sql = d.insertInto(table(tableName)).columns(columnList);
sql = sql.values(values);

Note that the list of values are not typed (they are all Object) and some 
of them can be null. When a null value does happen to come up it creates an 
insert statement in SQL to this effect

insert into my_table (id, A, B) 
values ($1, cast($2 as varchar), cast($3 as varchar))



Whats weird is it only attempts to cast when the values for A and B are 
null. How can I suppress the casting?

-Max

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