Hi Lukas,

thanks. The toString() helped a lot. The output is really helpful. We 
didn't think of that.
In the output we noticed that our synchronization code by mistake null'ed 
the primary key of the record. So updating was not possible. I feel 
sheepish.
I guess we need to ramp up on troubleshooting with jOOQ a bit.

Thanks for the fast reply.

Sascha


Am Donnerstag, 25. September 2014 08:34:04 UTC+2 schrieb Lukas Eder:
>
> Hello Sascha,
>
> I'm also moving this to a new thread, so it'll be easier to track in the 
> future.
>
> 2014-09-24 20:13 GMT+02:00 Sascha Herrmann <[email protected] 
> <javascript:>>:
>
>> And to add another oddity:
>>
>> Another record, this time on a table. When I iterate over the fields of 
>> the record, every field is flagged as changed (and one entry's value 
>> actually has changed to a new value). I then call record.update() but it 
>> returns a 0. I am puzzled.
>> I must be doing something wrong.
>>
>>  final StaffMemberCoreRecord staffMember = create.selectFrom( 
>> STAFF_MEMBER_CORE )
>>           .where( STAFF_MEMBER_CORE.STAFF_MEMBER_CODE.equal(
>>               DSL.upper( staffMemberCode ) ) ).forUpdate( ).fetchOne( );
>>
>>         TransactionalRunnable runnable = new TransactionalRunnable( ) {
>>             @Override
>>             public void run( Configuration config )
>>                   throws Exception {
>>               DSLContext create = DSL.using( config );
>>               DateTime now = JOOQUtils.getNow( create );
>>
>>               ......
>>
>>               staffMember.setSmModifiedDate( now );
>>               staffMember.update( );     
>> <------------------------------------------------------- returns 0, should 
>> return 1
>>
>>             }    // end method run
>>           };
>>
>>         create.transaction( runnable );
>>
>
> That looks interesting indeed. From the code segment that you've provided, 
> I cannot see anything extraordinary. What is the debug log output when you 
> run this update statement? What does staffMember.toString() return just 
> before the call to update()?
>
> Best Regards,
> 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/d/optout.

Reply via email to