Commit 0b47d9a8 by Alexandr

small doc fix in active-record

parent 6fff5662
......@@ -437,7 +437,7 @@ class Customer extends ActiveRecord
....
public function getOrders()
{
return $this->hasMany(Order::className, ['customer_id' => 'id']);
return $this->hasMany(Order::className(), ['customer_id' => 'id']);
}
}
......@@ -446,7 +446,7 @@ class Order extends ActiveRecord
....
public function getCustomer()
{
return $this->hasOne(Customer::className, ['id' => 'customer_id']);
return $this->hasOne(Customer::className(), ['id' => 'customer_id']);
}
}
```
......@@ -477,7 +477,7 @@ class Customer extends ActiveRecord
....
public function getOrders()
{
return $this->hasMany(Order::className, ['customer_id' => 'id'])->inverseOf('customer');
return $this->hasMany(Order::className(), ['customer_id' => 'id'])->inverseOf('customer');
}
}
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment