-
-
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.type:bugBugBug
Description
What steps will reproduce the problem?
I want select all failures with related job only if it has a reason on failure table and I use this
$failures = Failure::find()
->joinWith([
'job' => function ($query) {
$query->andOnCondition(['failure.reason' => 1]);
}
])->all();Error
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'failure.reason' in 'where clause'
SELECT * FROM job WHERE (job_id=2) AND (failure.reason=1)
Additional info
I have used (with) and (joinWith) also used (true and false) as second param to indicate eager or lazy and always get same error
| Q | A |
|---|---|
| Yii version | 2.0 |
Metadata
Metadata
Assignees
Labels
status:to be verifiedNeeds to be reproduced and validated.Needs to be reproduced and validated.type:bugBugBug