Commit f41f55a0 by Carsten Brandt

Merge pull request #2698 from ShNURoK42/patch-1

small doc fix in active-record
parents 6fff5662 0b47d9a8
...@@ -437,7 +437,7 @@ class Customer extends ActiveRecord ...@@ -437,7 +437,7 @@ class Customer extends ActiveRecord
.... ....
public function getOrders() 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 ...@@ -446,7 +446,7 @@ class Order extends ActiveRecord
.... ....
public function getCustomer() 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 ...@@ -477,7 +477,7 @@ class Customer extends ActiveRecord
.... ....
public function getOrders() 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