Browse Source

small doc fix in active-record

tags/2.0.0-beta
Alexandr 11 years ago
parent
commit
0b47d9a892
  1. 6
      docs/guide/active-record.md

6
docs/guide/active-record.md

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

Loading…
Cancel
Save