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

> 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