title: Expand mock data with UI5, JSON files
body: <p>I'm trying to mock some data based on existing and working oData models. The Mock Server works, but I am struggling making the <code>$expand</code> to do it's job. I <em>think</em> it's mostly a matter of me not understanding where or how to store the JSON. </p>
  
  <p>The metadata file is copied verbatim from the <em>working</em> service and contains all entities, entitysets, associations etcetera. </p>
  
  <p>Here are some of the relevant bits. From <code>Users</code> entity:</p>
  
  <pre><code>&lt;NavigationProperty Name="Dealers" Relationship="Y_DP_CORE_SRV.User_Dealer" FromRole="FromRole_User_Dealer" ToRole="ToRole_User_Dealer" /&gt;
  </code></pre>
  
  <p>The association:</p>
  
  <pre><code>&lt;Association Name="User_Dealer" sap:content-version="1"&gt;
    &lt;End Type="Y_DP_CORE_SRV.User" Multiplicity="1" Role="FromRole_User_Dealer" /&gt;
    &lt;End Type="Y_DP_CORE_SRV.Dealer" Multiplicity="*" Role="ToRole_User_Dealer" /&gt;
    &lt;ReferentialConstraint&gt;
      &lt;Principal Role="FromRole_User_Dealer"&gt;
        &lt;PropertyRef Name="Id" /&gt;
      &lt;/Principal&gt;
      &lt;Dependent Role="ToRole_User_Dealer"&gt;
        &lt;PropertyRef Name="Id" /&gt;
      &lt;/Dependent&gt;
    &lt;/ReferentialConstraint&gt;
  &lt;/Association&gt;
  </code></pre>
  
  <p>I can get <code>Users('PRX-00015')</code>. I cannot get <code>Users('PRX-00015')/Dealers</code> or <code>Users('PRX-00015')?$expand=Dealers</code>. There are no errors, but also no data. </p>
  
  <p>Here's <code>Users.JSON</code>:</p>
  
  <pre><code>[{
      "__metadata": {
          "id": "http://localhost/sap/opu/odata/sap/Y_DP_CORE_SRV/Users('PRX-00015')",
          "uri": "http://localhost/sap/opu/odata/sap/Y_DP_CORE_SRV/Users('PRX-00015')",
          "type": "Y_DP_CORE_SRV.User"
      },
      "Id": "PRX-00015",
      "FullName": "Jorg",
      "Email": "",
      "Telephone": "",
      "InternalUser": false,
      "Enabled": true,
      "Dealers": {
          "results": [{
              "__metadata": {
                  "id": "http://localhost/sap/opu/odata/sap/Y_DP_CORE_SRV/Dealers('AA2002')",
                  "uri": "http://localhost/sap/opu/odata/sap/Y_DP_CORE_SRV/Dealers('AA2002')",
                  "type": "Y_DP_CORE_SRV.Dealer"
              },
              "Id": "AA2002"
          }, {
              "__metadata": {
                  "id": "http://localhost/sap/opu/odata/sap/Y_DP_CORE_SRV/Dealers('AA1046')",
                  "uri": "http://localhost/sap/opu/odata/sap/Y_DP_CORE_SRV/Dealers('AA1046')",
                  "type": "Y_DP_CORE_SRV.Dealer"
              },
              "Id": "AA1046"
          }]
      },
  }]
  </code></pre>
  
  <p>I can also use the unexpanded version of <code>Dealers</code> and move the array into a <code>Dealers.json</code> file of it's own, in which case the line looks like</p>
  
  <pre><code>"Dealers": {
      "__deferred": {
          "uri": "http://localhost/sap/opu/odata/sap/Y_DP_CORE_SRV/Users('PRX-00015')/Dealers"
      }
  }
  </code></pre>
  
  <p>And <code>Dealers.json</code></p>
  
  <pre><code>[{
      "__metadata": {
          "id": "http://localhost/sap/opu/odata/sap/Y_DP_CORE_SRV/Dealers('AA2002')",
          "uri": "http://localhost/sap/opu/odata/sap/Y_DP_CORE_SRV/Dealers('AA2002')",
          "type": "Y_DP_CORE_SRV.Dealer"
      },
      "Id": "AA2002"
  }, {
      "__metadata": {
          "id": "http://localhost/sap/opu/odata/sap/Y_DP_CORE_SRV/Dealers('AA1046')",
          "uri": "http://localhost/sap/opu/odata/sap/Y_DP_CORE_SRV/Dealers('AA1046')",
          "type": "Y_DP_CORE_SRV.Dealer"
      },
      "Id": "AA1046"
  }]
  </code></pre>
  
  <p>All of these result in an empty <code>Dealers</code> array (<code>Dealers.length</code> being 0). Anyone know how this works?</p>