Closed dynasource closed 8 years ago
Confirmed, thanks for reporting. As far as I see from a quick look, the fix should be done in Query::from()
to turn string alias into array syntax.
$query = $model->getMembers2(); $query->join('LEFT JOIN','identity','identity_x_usergroup.left_id=idenitty.id'); $query->where('identity.status>0');
@dynasource why did you close it?
because its 2 years ago and I am not able to reproduce it nor support it with the current state of my software.
I am getting an error in a gridview. The error arises when adding a JOIN to the query (having a link. )
The error is generated because of a wrong table alias used in the where condition (done automatically by Yii). It uses the full 'from' statement in the Query in which a space of the alias is used like in http://www.yiiframework.com/doc-2.0/yii-db-query.html#from()-detail
The error:
The error is created in the following line: https://github.com/yiisoft/yii2/blob/master/framework/db/ActiveRelationTrait.php#L437
The table alias does not seem to be processed right.
thanks for looking at it.