Currently with saving we usually do not (yet) know the id of the new object client side. However, sometimes we need to save and/or update several models, once we persist the first model. In that case, one would like to use the following syntax
item.save().then ->
child = new App.Models.Child(item_id: item.id)
child.save()
However, since we have to rely on the Backbone model of promises, code gets really messy (or vulnerable to timing issues).
Currently with saving we usually do not (yet) know the id of the new object client side. However, sometimes we need to save and/or update several models, once we persist the first model. In that case, one would like to use the following syntax
However, since we have to rely on the Backbone model of promises, code gets really messy (or vulnerable to timing issues).
@steffansluis @joostverdoorn What do you think?