简体   繁体   English

使用 jooq 生成的 dao 插入/更新后如何插入/更新 object

[英]how to get inserted/updated object after inserting/updating with jooq generated dao

I generated DictOrgDao from dict_org table in my postgres DB, using jooq code generation tool.我使用 jooq 代码生成工具从我的 postgres 数据库中的 dict_org 表生成了 DictOrgDao。 This dao has common methods like insert and update but they all return void.这个 dao 有 insert 和 update 等常用方法,但它们都返回 void。 Is there any way to get inserted/updated object after inserting/updating with jooq generated dao?在使用 jooq 生成的 dao 插入/更新后,有什么方法可以插入/更新 object 吗?

This should work out of the box if your POJOs are mutable.如果您的 POJO 是可变的,这应该开箱即用。 Here are the relevant flags in Settings :以下是Settings中的相关标志:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM