rcd27
02/26/2022, 1:06 PMval innerJoin = ReceiptItems.join(Receipts, JoinType.INNER) { ReceiptItems.receiptId eq Receipts.id }
.join(Items, JoinType.INNER) { Receipts.resultItemId eq Items.id }
Is it possible to wrapRows
for a multiple entities, like ReceiptEntity.wrapRows(query)
, and others? I can extract all I need from a ResultSet
, but seems like iterating with next()
is a bit boilerplatyquery.map {
val receipt = ReceiptEntity.wrapRow(it)
val resultItem = ItemEntity.wrapRow(it)
val receiptItem = ReceiptItemEntity.wrapRow(it)
}
So I can wrap each row of query ResultSet
and extract data I need.