You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So If I make request without dataProvider, I have got all related models:
What do you get instead?
but if I using dataProvider related models will be empty
Additional info
It's happens because model keys case sensitive. For example I using Postgres citext or for MySQL (for utf8) my on condition case insensitive (luke = Luke).
I suggest add optional feature for this. May be useCaseInsensitiveKeys = false or something else? It might looks like:
//vendor/yiisoft/yii2/db/ActiveRelationTrait.phpprivatefunctionnormalizeModelKey($value)
{
if (is_object($value) && method_exists($value, '__toString')) {
// ensure matching to special objects, which are convertable to string, for cross-DBMS relations, for example: `|MongoId`$value = $value->__toString();
}
return$this->useCaseInsensitiveKeys ? strtolower($value) : $value;
}
any suggestions?
Q
A
Yii version
2.0.15.1
PHP version
7.0.2
Operating system
MacOs 12.4
related to #9077
The text was updated successfully, but these errors were encountered:
What steps will reproduce the problem?
What is the expected result?
So If I make request without
dataProvider
, I have got all related models:What do you get instead?
but if I using
dataProvider
related models will be emptyAdditional info
It's happens because model keys case sensitive. For example I using Postgres
citext
or for MySQL (for utf8) my on condition case insensitive (luke = Luke).I suggest add optional feature for this. May be
useCaseInsensitiveKeys = false
or something else? It might looks like:any suggestions?
related to #9077
The text was updated successfully, but these errors were encountered: