* Check whether this and `other` Instance refer to the same row * * @param {Model} other Other instance to compare against * * @returns {boolean}
(other)
| 4392 | * @returns {boolean} |
| 4393 | */ |
| 4394 | equals(other) { |
| 4395 | if (!other || !other.constructor) { |
| 4396 | return false; |
| 4397 | } |
| 4398 | |
| 4399 | if (!(other instanceof this.constructor)) { |
| 4400 | return false; |
| 4401 | } |
| 4402 | |
| 4403 | return this.constructor.primaryKeyAttributes.every(attribute => this.get(attribute, { raw: true }) === other.get(attribute, { raw: true })); |
| 4404 | } |
| 4405 | |
| 4406 | /** |
| 4407 | * Check if this is equal to one of `others` by calling equals |
no test coverage detected