title: breeze EntityManager: how to attach plain javascript object
body: <p>I have custom OData action that is called from my client.  The results from this action are a list of JSON objects which need to be merged back into the Breeze cache as entities.  How do I convert a JSON object into a Breeze entity and merge that entity back into the entityManager's cache?  Some code:</p>
  
  <pre><code>   $http.post('/odata/MyEntityType/MyCustomAction/', {
                      'someData': JSON.stringify(element1),
                      'SomeOtherData': JSON.stringify(element2)
                  })
                  .success(function (results) {
                      //results.value is an array of *MyEntityType* JSON objects.   `//Is there a way to convert these to breeze entities?`
  
                      });
  </code></pre>
  
  <p>Some things I have tried:</p>
  
  <blockquote>
    <p>manager.importEntities("MyEntityType", theJsonForAnEntity); //just stabbing in the dark here</p>
    
    <p>manager.createEntity("MyEntityType", theJsonForAnEntity); //error: A MergeStrategy of 'Disallowed' does not allow you to attach an entity when an entity with the same key is already attached"</p>
  </blockquote>