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

Most upvoted comments