title: Room SELECT Query for 1-n hashmap relationship
body: <p>I have the following ORM model:
  <a href="https://i.stack.imgur.com/nXT4j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nXT4j.png" alt="enter image description here" /></a></p>
  <p>Basically I want to track all public facilities of a state. So I have 1-n Relationship with a public facility like e.g. school:</p>
  <pre><code>public class StateWithFacilities {
  
      @Embedded
      State  state;
      @Relation(entity = School.class,parentColumn = &quot;schoolId&quot;,entityColumn = &quot;id&quot;)
      ArrayList&lt;School&gt; allSchools;
  }
  </code></pre>
  <p>The issue is that, I'm don't quite sure how to get allLocations which belong to a school, as a school has a HashMap of locations where the value represents to cost of the building.</p>
  <p>My 1) idea looks like this:</p>
  <pre><code>public class StateWithFacilities {
  
      @Embedded
      State  state;
      @Relation(entity = School.class,parentColumn = &quot;schoolId&quot;,entityColumn = &quot;id&quot;)
      ArrayList&lt;SchoolWithLocations&gt; allSchools;
  }
  
  public class SchoolWithLocations {
      @Embedded
      School school;
      @Relation(entity = Location.class,parentColumn = &quot;locationId&quot;,entityColumn = &quot;id&quot;)
      HashMap&lt;Location, float&gt; alllocationsWithCost;
  }
  </code></pre>
  <p>The proposed idea wouldn't work, since I can't keep track of the cost of the building. What would the best solution be? I want to have the implemented, rather than creating a new table/entity class unless I don't have another option.</p>