-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Deeply nesting relation using via
does not work
#11898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…sing via() to link it
some tests accidentally passed because they matched the primary key which is named `id` in all tables against similar primary key values. as soon as primary key values differ among tables, these tests are failing. reproduce #5341 on existing tests...
The problem lies in ActiveRelationTrait bucket building among these lines: yii2/framework/db/ActiveRelationTrait.php Lines 240 to 251 in 1c20062
|
It is currently not possible. I am planning to try fixing this for 2.0.13 |
Hi there! |
@GlyphDataServices My problem is same like in tests 7ec045b#diff-dca0f800c4dd790fb5d5914365547549R1194 See the screenshots In this case work fine But this way looks not good. |
@GlyphDataServices Dummy param not solving the problem. First it's asking for $digit_id, then it's asking for $item_id, then $product_id... And in result I see Trying to get property of non-object in my view because actually relations is not chaining :( |
@GlyphDataServices Shop So, Shops hasMany Product In back way it's always m2o, like you seen in my schema I'll try wit aliases and give feedback here later |
This PR adds a failing test from #7625 by @fernandezekiel and adjusted test data that fails even one of the existing relation tests.
these test failures cover the issue described in #5341