added note about fields that can be used in onCondition

This commit is contained in:
Carsten Brandt
2015-11-26 00:11:03 +01:00
parent 7c7ed48c4c
commit ad69b0f8cb

View File

@@ -626,6 +626,10 @@ class ActiveQuery extends Query implements ActiveQueryInterface
* }
* ```
*
* Note that this condition is applied in case of a join as well as when fetching the related records.
* Thus only fields of the related table can be used in the condition. Trying to access fields of the primary
* record will cause an error in a non-join-query.
*
* @param string|array $condition the ON condition. Please refer to [[Query::where()]] on how to specify this parameter.
* @param array $params the parameters (name => value) to be bound to the query.
* @return $this the query object itself