Skip to content

Wrong Schema.prototype.sufficientRemoveConditions function #18

@k1tzu

Description

@k1tzu

If 'key' is 0, for example
uid: cql.int()
and we try to remove uid = 0
like User.remove({uid: 0});
we get a false error in the function

Schema.prototype.sufficientRemoveConditions = function (conditions) {
  var keys = this.lookups
    ? Object.keys(this.lookupTables).concat(this.primaryKeys())
    : this.primaryKeys();

  return keys.every(function (key) {
    return !!conditions[key];
  });
};

"Must pass in all primary keys when using lookup tables"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions