Hi, i’m trying to get the value of a key (when using the DAO API) without having an extra select to fetch the referenced object. There should be no need for that but can’t seem to find an answer
j
Joel
03/29/2021, 7:15 PM
Within the context of the target entity use
Table.column.lookup()
Joel
03/29/2021, 7:15 PM
I've also seen folks map the column directly, and map the relation
Joel
03/29/2021, 7:16 PM
Copy code
val authorId = CommentTable.authorId
val author by Author referencedOn CommentTable.authorId