public function equals($record) { if ($this->isNewRecord || $record->isNewRecord) { return false; } return static::tableName() === $record->tableName() && $this->getPrimaryKey() === $record->getPrimaryKey(); }
/** * {@inheritdoc} */ public function equals($record) { if ($this->isNewRecord && $record->isNewRecord) { return $record === $this; } return parent::equals($record); }