Hi Ramon,

UPDATE .. RETURNING is currently only supported in DB2, Firebird, and
PostgreSQL, which all have native SQL support for this kind of clause. Most
other databases support fetching generated keys (and possibly other values)
via JDBC's Statement.getGeneratedKeys(), but usually only for INSERT
statements, unfortunately.

What database are you using?

Best Regards,
Lukas

2016-03-07 10:25 GMT+01:00 Ramon Lansangan <[email protected]>:

> I would like to return the updated pojo, but it throws
> NullPointerException, it was able to update the database though.
>
> Foos savedFoo =
>                 dslContext.update(com.test.core.model.tables.Foos.FOOS)
>                         .set(com.test.core.model.tables.Foos.TITLE, foo.
> getTitle())
>                         .where(com.test.core.model.tables.Foos.ID.equal(
> foo.getId()))
>                         .returning()
>                         .fetchOne()
>                         .into(Foos.class);
>
> --
> 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.
>

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