SqlDelight question: What is the preferred way to...
# squarelibraries
d
SqlDelight question: What is the preferred way to map one-to-many models?
Copy code
data class Team(val players: List<Player>)

fun selectAllTeams(): List<Team> {
   return db.teamQueries.whatGoesHere()
}
• Should I use a JOIN and group + map it manually? • Should I perform 2 separate queries (select teams, for each select players) and use their mappers? • Other?