https://kotlinlang.org logo
#room
Title
# room
b

Bradleycorn

02/28/2023, 4:06 PM
Given Room’s “multimap” approach:
Copy code
@Query(
    "SELECT * FROM user" +
    "JOIN book ON user.id = book.user_id"
)
fun loadUserAndBookNames(): Map<User, List<Book>>
Can I use a typealias with this? Like so:
Copy code
typealias BookWorms: Map<User, List<Book>>

@Query(
    "SELECT * FROM user" +
    "JOIN book ON user.id = book.user_id"
)
fun loadUserAndBookNames(): BookWorms
m

myanmarking

03/23/2023, 5:22 PM
just try it out and check if it works or not
21 Views