I stumbled upon this again. I've created an issue for this problem:
https://github.com/jOOQ/jOOQ/issues/13270

It seems to happen with R2DBC only, not with JDBC (at least not in my test 
case). Nonetheless, I think it would be better to use any explicit DataType 
available on the left-hand-side ROW expression and apply those to the 
right-hand-side, as well.

On Friday, October 1, 2021 at 2:56:35 PM UTC+2 che...@robovolt.ai wrote:

> Thank you Lukas
>
> It works well :)
>
> 2021년 10월 1일 금요일 오후 8시 11분 41초 UTC+9에 lukas...@gmail.com님이 작성:
>
>> Hi Cheolho,
>>
>> There are some open issues related to using null values inside of row() 
>> expressions, when jOOQ can't infer the data type even if intuitively, it 
>> should work. The workaround is to wrap the null value in DSL.value(null, 
>> dataType), to make sure the right data type is associated with the value.
>>
>> I hope this helps,
>> Lukas
>>
>> On Fri, Oct 1, 2021 at 1:08 PM Cheolho Jeon <che...@robovolt.ai> wrote:
>>
>>> Hi Lukas!
>>> Thank you for serving JOOQ.
>>>
>>> I'm using JOOQ for project but I see a problem when I use update 
>>> statement with DSL.row().
>>> I want to use some nullable property(field) to DSL.row() on update 
>>> statement like this:
>>> *update(CLAIM)*
>>> *.set(*
>>> *    row(CLAIM.DESIRED_DATETIME, ...),*
>>> *    row(null as LocalDateTime?, ...)*
>>> *)*
>>> *...*
>>>
>>> But when I run this code I met this error:
>>> *Caused by: java.lang.IllegalArgumentException: Cannot encode null 
>>> parameter of type java.lang.Object*
>>> * at 
>>> io.r2dbc.postgresql.codec.DefaultCodecs.encodeNull(DefaultCodecs.java:184)*
>>>
>>> I found that this code is run well:
>>> *update(CLAIM)*
>>> *.set(*
>>> *    CLAIM.DESIRED_DATETIME, null as LocalDateTime?*
>>> *)*
>>> *...*
>>>
>>> But I want to set multiple nullable properties(fields) at once.
>>> Can you tell me the way resolve this problem?
>>>
>>> Thank you.
>>>
>>> P.S All code is written by Kotlin.
>>>
>>> -- 
>>> 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 jooq-user+...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jooq-user/715359eb-c12b-4676-b671-fd57a6f20140n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/jooq-user/715359eb-c12b-4676-b671-fd57a6f20140n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
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 jooq-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/56033e02-1dc0-4840-81a1-89fdc73176bfn%40googlegroups.com.

Reply via email to