ember.js - Is there any way to create a batch of multiple records with a single POST request in Ember Data? -
var batch = [somerecord, somerecord, somerecord...] batch.invoke('save');
if have array of 50 newly created records , invoke save on array, ember data make 50 post requests. rather bulk them single request , handle on api performance. there way this?
right appears have implement manually ajax. if there better way, please share.
there used bulkcommit
feature in ember-data on restadapter, removed.
as workaround today, way can think of sending multiple records server @ same time create custom adapter knows how serialize multiple records include of records want serialize in hasmany relationship on model.
https://github.com/emberjs/data/issues/2845
so no, you'll need implement own solution in own adapter (or straight make ajax call wherever if you're feeling naughty).
Comments
Post a Comment