I have a model that has children (i.e. links to other instances of 2 other model types).
The models are kept in a collection.
prepareView: function (el) {
return new ObjectForm({
el: el,
model: this.model,
submitCallback: function (data) {
//The form is submitted, data contains the info from the form, including the children models
app.objects.create(data, {
wait: true,
success: function (model, response, options) {
// The children are not properly saved when using app.objects.create, so save the model again
// Note that the same data from the form is used, which does properly already contain the children
model.save(data, {
wait: true,
success: function (model, response, options) {
//Do other stuff
app.navigate('/admin/objects');