@ -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']);
}
@ -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']);