On Tuesday, September 13, 2016 at 7:41:08 AM UTC+2, Lukas Eder wrote:
>
>
>
> 2016-09-12 23:32 GMT+02:00 BTJ <[email protected] <javascript:>>:
>
>> Thx...
>>
>> So if I use record.from, will the store method do an update as long as 
>> the id field is not null?
>>
>
> By default, no, it will run an insert because record.from() will have 
> modified the primary key column. Do note that by "modify" (i.e. 
> Record.changed()), jOOQ understands that some client code called 
> Record.set(ID, someValue), regardless of the value, i.e. regardless if the 
> value has actually changed.
>  
>
>> Also, are you saying the using the store method is not the best way to do 
>> this or?
>>
>
> Sure, it's a good solution, you just need to understand how it works, and 
> how the jOOQ Record.changed() model works.
>
>  
>

Ok but since I have to separate by insert or update anyway then perhaps 
it's just as easy do call executeUpdate or executeInsert instead... :)

BTJ

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