breeze get a collection of entities not objects
<p>Using a restful <strong>node.js</strong> server and sending a collection of entities wrapped in one entity object (Lookups) everything works, but the entities in the collection are seen as plain objects and not entities by <strong>breeze</strong>. Is there a way to fix this, also instead of using an entity for the Lookups is it possible to use a complex object since its used just as a holder and nothing more. Thanks for the help</p>

<p>The response from the server is in this format</p>

<pre><code>[
  oranges:[{id:1, name:'juicy'}, {id:2, name:'no seeds'}],
  apples:[{id:1, name:'red'}, {id:2, name:'green'}]
]
</code></pre>

<p>using this query:</p>

<pre><code>breeze.EntityQuery.from('users/lookups')
            .using(this.manager).execute()
            .then(this.querySucceeded)
            .catch(this.queryFailed);
</code></pre>

<p>Here is the metadata code for the lookup</p>

<pre><code>var entityType = {
   name: this.entityNames.Lookup,
   defaultResourceName: 'users/lookups',
   autoGeneratedKeyType: breeze.AutoGeneratedKeyType.Identity,
   dataProperties: {
      lookupID: {dataType: DT.Int32, isPartOfKey: true}
   },
   navigationProperties:  {
      apples: {
             entityTypeName: this.entityNames.Apple
       },
      orange: {
             entityTypeName: this.entityNames.Orange
       }
   }
};
</code></pre>

<p>The meta for the Orange and Apple</p>

<pre><code>var entityType = {
    name: this.entityNames.Apple,
    defaultResourceName: 'users/lookups/Apples',
    dataProperties: {
         id: {type: DT.Int32},
         image: {type: DT.String},
         name: { complexTypeName: 'Translation:#model', isNullable: false}
    }
 };


var entityType = {
    name: this.entityNames.Orange,
    defaultResourceName: 'users/lookups/Oranges',
    dataProperties: {
         id: {type: DT.Int32},
         image: {type: DT.String},
         name: { complexTypeName: 'Translation:#model', isNullable: false}
    }
 };
</code></pre>

<p>The meta for complex type Translation</p>

<pre><code>var entityType = {
    name: 'Translation',
    isComplexType: true,
    dataProperties: {
         fr: {type: DT.String},
         en: {type: DT.String}
    }
 };
</code></pre>