You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
deleteAll does not work for embedsMany relations #251
/* Workaround to make delete on embedsMany work */
Exercise.prototype.__delete__resources = function (cb) {
var self = this;
self.resources(function(err, resources) {
if (err) cb(err);
resources.forEach(function(resource) {
self.resources.destroy(resource.id, function(err) {
if (err) cb(err);
});
});
cb();
});
};
Activity
[-]deleteAll is not defined for embedsMany relations[/-][+]deleteAll does not work for embedsMany relations[/+]offlinehacker commentedon Aug 22, 2014
Current workaround:
jannyHou commentedon Aug 12, 2016
I am closing it since duplicate bug already reported here: #258
To keep it easy to track let's keep updating fix and discussion under that one. Thanks for understanding :)