How to query an entity based on a composite key in Jooq? E.g.:
UserAttempts org.jooq.impl.DAOImpl.findById(Record2<UInteger, String> id)
id
is a composite key. How to use the Record2<UInteger, String>
?
How to query an entity based on a composite key in Jooq? E.g.:
UserAttempts org.jooq.impl.DAOImpl.findById(Record2<UInteger, String> id)
id
is a composite key. How to use the Record2<UInteger, String>
?
You can construct a Record2
using DSLContext.newRecord()
:
UserAttempts attempts =
dao.findById(ctx.newRecord(USER_ATTEMPTS.ID_COLUMN1, USER_ATTEMPTS.ID_COLUMN2)
.values(uint(1), "abc"));
© 2022 - 2024 — McMap. All rights reserved.