title: How can I save a single entity with EntityManager's saveChanges() method?
body: <p>Suppose I have the following data structure: a <strong>Customer</strong> entity that has a collection of <strong>Orders</strong> (1 to n relationship). So, <code>Customer.Orders()</code> returns an array of zero or more <strong>Orders</strong>.</p>
  
  <p>Now, I create a new <strong>Customer</strong> <code>newCustomer</code>, and a new <strong>Orders</strong> entity array. This <strong>Orders</strong> entity array is assigned to the <strong>Customer</strong>. All entities have the "Added" entity state.</p>
  
  <p>Then, I call <code>saveChanges()</code> as follows: </p>
  
  <pre><code>manager.saveChanges([newCustomer])
  </code></pre>
  
  <p>I used the <code>saveChanges()</code>'s <code>[entities]</code> parameter according to this documentation: <a href="http://www.breezejs.com/sites/all/apidocs/classes/EntityManager.html#method_saveChanges" rel="nofollow">http://www.breezejs.com/sites/all/apidocs/classes/EntityManager.html#method_saveChanges</a></p>
  
  <p>I would expect that both the <code>newCustomer</code> and its <strong>Orders</strong> array would be saved in the server, <strong>but only the</strong> <code>newCustomer</code> <strong>was saved.</strong></p>
  
  <p>Is there any way to save the <code>newCustomer</code> and its <strong>Orders</strong> array? Maybe I could pass all entities in the <code>[entities]</code> parameter, but this would be verbose and a point of bugs.  I know I could call only <code>saveChanges()</code> method to save all entities, but I want to save <strong>only</strong> a specific entity completely.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Bernardo Pacheco</p>