Browse Source

Mongo Active Relation unit test fixed.

tags/2.0.0-beta
Klimov Paul 11 years ago
parent
commit
1129d820ed
  1. 2
      tests/unit/data/ar/mongo/Customer.php
  2. 2
      tests/unit/data/ar/mongo/CustomerOrder.php

2
tests/unit/data/ar/mongo/Customer.php

@ -27,6 +27,6 @@ class Customer extends ActiveRecord
public function getOrders() public function getOrders()
{ {
return $this->hasMany(CustomerOrder::className(), ['customer_id' => 'id']); return $this->hasMany(CustomerOrder::className(), ['customer_id' => '_id']);
} }
} }

2
tests/unit/data/ar/mongo/CustomerOrder.php

@ -22,6 +22,6 @@ class CustomerOrder extends ActiveRecord
public function getCustomer() public function getCustomer()
{ {
return $this->hasOne(Customer::className(), ['id' => 'customer_id']); return $this->hasOne(Customer::className(), ['_id' => 'customer_id']);
} }
} }
Loading…
Cancel
Save