Hi, I was trying to return a multimap from a query...
# room
b
Hi, I was trying to return a multimap from a query to have a
Map<CategoryEntity, List<CategoryEntity>>
. So, making a query joining on the same table :
Copy code
@Query(
    "SELECT * FROM category as parent" +
    "JOIN category as child ON parent.id = child.parent_id"
)
fun loadCategoriesAndSubCategories(): Map<CategoryEntity, List<CategoryEntity>>
It's not working because it's mapping with the column name. I tried to rename all the columns, but it doesn't work too. Someone knows if it's possible to do it ?