Wyatt Kennedy
10/11/2023, 12:40 AM(UserTable innerJoin UserDataTable)
and then try to get each entity from the result with UserEntity.wrapRows(query)
and UserDataEntity.wrapRows(query)
, this runs the same query twice. Is this the normal behavior of a query and is there any way to get the query to be "realized" so to speak but still be a SizedIterable
so that I can call wrapRows
?wrapRows
literally just iterates over the ResultRow
and calls wrapRow
. So I just called toList
which calls out to the db, and then used .map { val user = UserEntity.wrapRow(it); val data = UserDataEntity.wrapRow(it); user.data = data }
. The calls to wrapRow do not trigger a fetch to the db.