From 380d1d02fb950a49c9e7299e5d9472b6bed285a3 Mon Sep 17 00:00:00 2001 From: Paul Klimov Date: Fri, 6 Dec 2013 11:32:26 +0200 Subject: [PATCH] Method "\yii\mogo\ActiveRecord::equals()" fixed. --- extensions/mongo/ActiveRecord.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/mongo/ActiveRecord.php b/extensions/mongo/ActiveRecord.php index b0a360e..86aa6d1 100644 --- a/extensions/mongo/ActiveRecord.php +++ b/extensions/mongo/ActiveRecord.php @@ -348,6 +348,6 @@ abstract class ActiveRecord extends BaseActiveRecord if ($this->isNewRecord || $record->isNewRecord) { return false; } - return $this->collectionName() === $record->collectionName() && $this->getPrimaryKey() === $record->getPrimaryKey(); + return $this->collectionName() === $record->collectionName() && (string)$this->getPrimaryKey() === (string)$record->getPrimaryKey(); } } \ No newline at end of file