Fix Advanced Conditions samples which are wrong
The documented results of the following samples are (thankfully) wrong:
$query = $articles->find()
    ->where([
        'author_id' => 3,
        'OR' => ['author_id' => 2],
    ]);
Would actually create: SELECT * FROM articles WHERE (author_id = 2 AND author_id = 3)
$query = $articles->find()
        ->where(['author_id' => 2])
        ->orWhere(['author_id' => 3])
        ->andWhere([
            'published' => true,
            'view_count >' => 10
        ])
        ->orWhere(['promoted' => true]);
Would actually create: SELECT * FROM articles WHERE (promoted = true OR ((published = true AND view_count > 10) AND (author_id = 2 OR author_id = 3)))
Loading
Please sign in to comment