-
-
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
findByIds with empty array returns value #1118
Comments
The issue is that in /src/query-builder/SelectQueryBuilder.ts#L717-L730 it passes the array without checking to the typeorm/src/query-builder/QueryBuilder.ts Lines 584 to 598 in fe24877
However, I am not sure how this should be handled as for the fixing also both |
I also found that whereString was a problem, but not sure about how to handle when |
Sounds like an issue. Feel free to contribute |
fixed and will be released in |
* master: fixes #996 fixed failing test added test for #1145 added "ON CONFLICT" cause support for #1090 removed only test added support for indices and listeners in embeddeds version bump added test for #1178 added test for #1210 fixes #1201 removed only test fixes #1118 fixed comments style version bump fixes #1119 and #1205 fixes #1110 # Conflicts: # package.json # src/entity-manager/EntityManager.ts # src/migration/MigrationExecutor.ts # src/query-builder/InsertQueryBuilder.ts # src/repository/BaseEntity.ts # src/subscriber/Broadcaster.ts # test/github-issues/1178/entity/Post.ts # test/github-issues/1178/issue-1178.ts
… no criteria were passed in an array"
If the given id array is empty, we expect an empty array to be returned, but actually all rows of that entity are returned.
I checked that the where clause is missing from the generated query when the Id array is empty. Is this behavior intended?
The text was updated successfully, but these errors were encountered: