mikro-orm: Smart joins don't work with $or and $and
Describe the bug
If i use query
em.find(Entity, { product: {id: 1}, organization: {id: 1} });
it produces correct sql with joins. Similar query with $or or $and
em.find(Entity, { $or: [{product: { id: 1} }, { organization: { id: 1} }] });
produces incorrect sql without joins and any conditions.
Expected behavior Correct sql or at least an error that such query is unsupported.
Versions
Latest @next
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (11 by maintainers)
Commits related to this issue
- feat(core): add support for deep nested conditions with operators Refactor handling of where/having/orderBy criteria to CriteriaNode helper that allows better control over deeply nested structures. ... — committed to mikro-orm/mikro-orm by B4nan 5 years ago
- feat(core): add support for deep nested conditions with operators Refactor handling of where/having/orderBy criteria to CriteriaNode helper that allows better control over deeply nested structures. ... — committed to mikro-orm/mikro-orm by B4nan 5 years ago
- feat(core): add support for deep nested conditions with operators Refactor handling of where/having/orderBy criteria to CriteriaNode helper that allows better control over deeply nested structures. ... — committed to mikro-orm/mikro-orm by B4nan 5 years ago
- feat(core): add support for deep nested conditions with operators (#185) Refactor handling of where/having/orderBy criteria to CriteriaNode helper that allows better control over deeply nested struct... — committed to mikro-orm/mikro-orm by B4nan 5 years ago
here you go: https://github.com/mikro-orm/mikro-orm/pull/185