* Check whether this and `other` Instance refer to the same row * * @param {Model} other Other instance to compare against * * @returns {boolean}
(other)
| 4552 | * @returns {boolean} |
| 4553 | */ |
| 4554 | equals(other) { |
| 4555 | if (!other || !other.constructor) { |
| 4556 | return false; |
| 4557 | } |
| 4558 | |
| 4559 | if (!(other instanceof this.constructor)) { |
| 4560 | return false; |
| 4561 | } |
| 4562 | |
| 4563 | return this.constructor.primaryKeyAttributes.every(attribute => this.get(attribute, { raw: true }) === other.get(attribute, { raw: true })); |
| 4564 | } |
| 4565 | |
| 4566 | /** |
| 4567 | * Check if this is equal to one of `others` by calling equals |
no test coverage detected