One ajax request per commit with parent saving with children


#1

Is it possible to do something as follows:

  var p = App.Parent.createRecord()
  p.get('children').createRecord()
  p.get('children').createRecord()
  this.get('store').commit()

And have it fire off only one ajax request? If find I have to create the parent first, and then through a callback create the children which seems inefficient and won’t have the benefit of wrapping things in a database transaction server side. How can this be done properly with ember data?