vjsrinath / sails-orientdb

An waterline adapter for orient db

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

destroy issue

martingg88 opened this issue · comments

Can you look at following code.
it should be where(options.where) ?
can you change it?

dbHelper.prototype.destroy = function (collection, options, cb) {

    this.db.delete()
        .from(collection)
        .where(options)
        .transform(transformers)
        .scalar()
        .then(function (total) {
            cb(null, total);
        })
        .error(function (err) {
            cb(err);
        });

};