title: Update a complex object on Backand using $http PUT
body: <p>I am using Backand to provide the database and REST api for my Angular app.</p>
  
  <p>I am working on a capability for users to make edits to a complex object, which should then be updated on the database. Straightforward enough...</p>
  
  <p>The object looks a bit like this:</p>
  
  <pre><code>obj = {
    id: 1,    // assigned by the db
    name: "My List",
    tasks: [
      { id: 1, desc: "Task 1" },
      { id: 2, desc: "Task 2" }, 
       ... 
    ]
  }
  </code></pre>
  
  <p>For the update ($http PUT) call, I would like to use <code>params: { deep: true }</code> as a shortcut to minimise code and <code>$http</code> calls.</p>
  
  <p>The problem at the moment is that while the PUT command updates the "master" object in the database, the edited "child" objects are not updated, but appended as new child objects. </p>
  
  <p>For instance, if I try to update the master and child objects in one call:</p>
  
  <pre><code>$http({
    method: 'PUT',
    url: baseUrl + 'lists/' + list.id,
    params: {
      deep: true
    },
    data: {
      id: 1,
      name: "My To Do List",
      tasks: [
        { id: 1, desc: "New Description for Task 1" },
        { id: 2, desc: "New Description for Task 2" }
      ]
    }
  }).then( .... );
  </code></pre>
  
  <p>the database doesn't <strong>update</strong> the child objects, it appends them. Here's how the resulting object is in the database: </p>
  
  <pre><code>list = {
    id: 1,  
    name: "My To Do List",    // Updated correctly
    tasks: [
      { id: 1, desc: "Task 1" },
      { id: 2, desc: "Task 2" }, 
      { id: 3, desc: "New Description for task 1" },  // Added not updated
      { id: 4, desc: "New Description for task 2" }   // Added not updated
    ]
  }
  </code></pre>
  
  <p>I have made sure that the child objects' <code>id</code>s are correct.</p>
  
  <p>Is there any way to do this succinctly or am I resigned to doing it in multiple stages? Does <code>deep = true</code> even work with PUT? The <a href="http://docs.backand.com/en/latest/apidocs/apidescription/index.html" rel="nofollow">Backand docs</a> don't mention it.</p>