We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi guys!
I have a little problem using the destroyAll on hasManay relations
The problema is that the callback is never called inside the destroyAll method of the mixins.
I have added the parameters options to the method like the definition in the destroyAll of the juggler dao.js and now it works
Model.destroyAll = function softDestroyAll(where, options, cb) { if (options === undefined && cb === undefined) { if (typeof where === 'function') { cb = where; where = {}; } } else if (cb === undefined) { if (typeof options === 'function') { cb = options; options = {}; } } return Model.updateAll(where, {...scrubbed, [deletedAt]: new Date(), [_isDeleted]: true }) .then(result => (typeof cb === 'function') ? cb(null, result) : result) .catch(error => (typeof cb === 'function') ? cb(error) : Promise.reject(error)); };
The use case where the mixins fail is the following:
User.upsert(new User(user), function(err, instance) { if(err) { return cb(error); } instance.roles.destroyAll(function (error) { // never enter here }); });
Where RoleMapping model has SeoftDelete enabled.
I'm missing something? or is ti a real bug?
Thank you!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi guys!
I have a little problem using the destroyAll on hasManay relations
The problema is that the callback is never called inside the destroyAll method of the mixins.
I have added the parameters options to the method like the definition in the destroyAll of the juggler dao.js and now it works
The use case where the mixins fail is the following:
Where RoleMapping model has SeoftDelete enabled.
I'm missing something? or is ti a real bug?
Thank you!
The text was updated successfully, but these errors were encountered: