getQuery causing inconsistencies in queryBuilder execution with JsonType and complex query #5247
Closed
5 tasks done
Labels
bug
Something isn't working
Describe the bug
I've identified a bug related to an entity containing a property of type JsonType. This bug occurs specifically when executing a query builder (qb) with a complex where statement after invoking the getQuery() method on the qb object.
Interestingly, the complex query functions correctly when the getQuery() method is not called before execution. Additionally, I've provided a simple query where the bug is not reproducible.
To reproduce the error, you can utilize the provided reproduction case.
A workaround for this issue is to use qb.clone(true).getQuery(). However, it's worth noting that the observed behavior with both simple and complex queries appears inconsistent.
Reproduction
What driver are you using?
@mikro-orm/sqlite
MikroORM version
6.1.1-dev.3
Node.js version
v20.10.0
Operating system
Linux
Validations
The text was updated successfully, but these errors were encountered: