From 1129d820edde891155213b3cbd7841981cc22cea Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Sun, 1 Dec 2013 17:45:18 +0200 Subject: [PATCH] Mongo Active Relation unit test fixed. --- tests/unit/data/ar/mongo/Customer.php | 2 +- tests/unit/data/ar/mongo/CustomerOrder.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/data/ar/mongo/Customer.php b/tests/unit/data/ar/mongo/Customer.php index 83c4255..f90e5cd 100644 --- a/tests/unit/data/ar/mongo/Customer.php +++ b/tests/unit/data/ar/mongo/Customer.php @@ -27,6 +27,6 @@ class Customer extends ActiveRecord public function getOrders() { - return $this->hasMany(CustomerOrder::className(), ['customer_id' => 'id']); + return $this->hasMany(CustomerOrder::className(), ['customer_id' => '_id']); } } \ No newline at end of file diff --git a/tests/unit/data/ar/mongo/CustomerOrder.php b/tests/unit/data/ar/mongo/CustomerOrder.php index 2192be3..a01e47f 100644 --- a/tests/unit/data/ar/mongo/CustomerOrder.php +++ b/tests/unit/data/ar/mongo/CustomerOrder.php @@ -22,6 +22,6 @@ class CustomerOrder extends ActiveRecord public function getCustomer() { - return $this->hasOne(Customer::className(), ['id' => 'customer_id']); + return $this->hasOne(Customer::className(), ['_id' => 'customer_id']); } } \ No newline at end of file