自动附加记录
适用于 ✅ 开源版 ✅ 专业版 ✅ 企业版
AuthorRecord author =
DSL.using(configuration) // This configuration will be attached to any record produced by the below query.
.selectFrom(AUTHOR)
.where(AUTHOR.ID.eq(1))
.fetchOne();
author.setLastName("Smith");
author.store(); // This store call operates on the "attached" configuration.
在某些情况下(例如,序列化记录时),可能不希望将创建记录的 Configuration 附加到该记录。 这可以通过 attachRecords 设置来实现
示例配置
Settings settings = new Settings()
.withAttachRecords(false); // Defaults to true
反馈
您对此页面有任何反馈吗? 我们很乐意听到您的声音!