Bwaim
11/15/2022, 6:06 PMMap<CategoryEntity, List<CategoryEntity>>
. So, making a query joining on the same table :
@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 ?