-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
Query builder regression in 0.2 #2103
Comments
but where is a bug? Everything looks correct in 0.2.x and it works as expected. I would say that in 0.1.x it did not work as expected. |
Maybe it's then a difference of opinion, but I don't see any practical use for the query that .whereInIds([1, 2, 3])
.andWhere('x = 1') produces. Especially if we consider SQL IN query. Consider the following table:
Now perform the query I would expect
But, the query performed by TypeORM 0.2 is:
To me this looks like a bug, but if it's not I can live with it since
|
okay, so if it does following query:
then we shall make a fix to make it this way:
|
partially for this case it was fixed in #3431 |
we shall add tests with the same use case as original author and check if they pass |
yep, I know how to fix it and will try to do this in few days :) |
also it is not just a postgres driver bug, but all |
fixing query builder regression #2103
@vesse it is fixed now in master, can you check it? |
Since tests are passing this issue should be resolved now. @silentroach thank you very much! |
Issue type:
[ ] question
[X] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[X]
postgres
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
TypeORM version:
[X]
latest
[ ]
@next
[X]
0.1.20
(or put your version here)Steps to reproduce or a small repository showing the problem:
Query builder generated SQL changed after upgrade to 0.2 in a way that affects results. This
produces
in 0.2.5, and
in 0.1.20. Because of the parentheses over
id
conditions have changed, a different set of results is returned. If the order of the conditions is changed tothe generated SQL is
for 0.2.5 and
for 0.1.20, and both thus return the same results.
The text was updated successfully, but these errors were encountered: