properly quote table names for join().

This commit is contained in:
Qiang Xue
2014-03-26 15:02:56 -04:00
parent 21bc29560c
commit bc378d1cae
3 changed files with 31 additions and 33 deletions

View File

@@ -409,6 +409,11 @@ class ActiveRecordTest extends DatabaseTestCase
'orders' => function ($q) { $q->orderBy([]); }
])->one();
$this->assertEquals(1, $customer->id);
$order = Order::find()->joinWith([
'items' => function ($q) {
$q->from(['items' => 'tbl_item']);
},
])->one();
}
public function testJoinWithAndScope()