-
-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
status:to be verifiedNeeds to be reproduced and validated.Needs to be reproduced and validated.
Description
What steps will reproduce the problem?
for example I have three tables. order , item , order_item
Class Order extends ActiveRecord
{
public function getItems()
{
return $this->hasMany(Item::className(), ['id' => 'item_id'])
->viaTable('order_item', ['order_id' => 'id']);
}
}
Order::findOne(1)
The querys
1.select * from order where id=1;
2.select * from order_item where order_id = 1;(empty result)
3.select * from item where 0=1; (why have this? );
I looked the source code

What is the expected result?
What do you get instead?
Additional info
| Q | A |
|---|---|
| Yii version | 2.0.5 |
| PHP version | 7.1.9 |
| Operating system |
Metadata
Metadata
Assignees
Labels
status:to be verifiedNeeds to be reproduced and validated.Needs to be reproduced and validated.