Agh. Previous mail got sent too early.

2013/9/24 Rob Nikander <[email protected]>

> Hi,
>
> Here's a weird one...
>
>     val suffix = now.toString("_yyyy_MM_dd_")
>
>     val updateQuery = dsl.update(t).set(t.FOO, concat(t.FOO, value(suffix)))
> ....
>
> This renders SQL like:
>
>     ... set Foo = (cast(Foo as varchar) + ?), ...
>
> This truncates Foo to 30 chars before appending to it.  If I manually
> change varchar to varchar(max) it works fine. Strangely, the first
> version works fine when I type the query into SQL Studio. It's only when I
> go through JDBC and the jtds driver that this truncation happens. Also I'm
> using SQL Server 2008 R2, and your docs specifically say you support R8 and
> later.
>
> But... any idea for a workaround, short of going back to manual SQL? Can I
> somehow tell it to use varchar(max) (or not cast at all?).
>
The truncation is a known issue and has been fixed in jOOQ 3.2
https://github.com/jOOQ/jOOQ/issues/2712

The cast itself seems indeed unnecessary:
https://github.com/jOOQ/jOOQ/issues/2597

> BTW, I've posted a few things here recently. Thank you for this library.
> For me it's a lot more usable than Slick for everyday work.
>
Thanks for this feedback. I'm curious, how would you describe the pros and
cons of each library?

Cheers
Lukas

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