Replies: 2 comments 1 reply
-
I took a look at your repro, but the tests are passing just fine with both 5.7.13 and the latest version. I'd also appreciate minimal reproductions, this is a really huge and complex setup. Take a look at the issue tests, a good reproduction looks like those: https://github.com/mikro-orm/mikro-orm/tree/master/tests/issues |
Beta Was this translation helpful? Give feedback.
-
After checking my setup I have realized that I had mikro-orm 5.6.13 installed, I dont know how and why. Replacing it with 5.7.13 my third test still fails, but the second one now succeeds. I have tested with versions in between and it looks like version 5.6.16 fixed that. The third test fails with latest version (5.8.3) too. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I have a bit weird database schema. It describes geometrical relations of boundaries. It contains outers (external boundaries) which can be individually divided in several ways, called divisions. One of divisions of an outer is always active, so each outer has both an 1: M (all divisions) and a 1:1 (active division) references. There are some more entities under this level (each division refers to internal boundaries which refer to geometry data), but the issue is related to double reference.
I am using QueryBuilder to get the entity chain Outer -> active Division -> [Inners] -> Geometry, properly populated. If I do not want to query non-active divisions then I succeed, otherwise not (see the attached code). Test 1/3 succeeds, 2/3 and 3/3 tests fail.
In all test cases the query is properly built, the result set contains everything we need, but in latter cases the entity mapping does not works as expected.
To Reproduce
Test.zip
Expected behavior
Proper entity mapping.
Versions
5.7.13
Beta Was this translation helpful? Give feedback.
All reactions