Issue Description
Different behavior from the connection manager find method and the repository find method.
The repository find method creates a query as expected with In clause, like:
manager.getRepository(Entity).find({ foo: In(['bar', 'derp']) })
SELECT * FROM entity WHERE foo IN ('bar','derp')
On the other hand, the manager find generates the following clause, like:
manager.find(Entity,{ where: { foo: In(['bar', 'derp']) }})
SELECT * FROM table WHERE foo = $1
Expected Behavior
manager.find(Entity,{ where: { foo: In(['bar', 'derp']) }})
generates
SELECT * FROM table WHERE foo = $1
instead of
SELECT * FROM entity WHERE foo IN ('bar','derp')
Actual Behavior
Described below.
// include the output in code tags like these!
Steps to Reproduce
My Environment
| Dependency |
Version |
| Operating System |
MacOS X Catalina |
| Node.js version |
v12.16.1 |
| Typescript version |
v4.0.5 |
| TypeORM version |
v0.2.29 |
Additional Context
Relevant Database Driver(s)
Are you willing to resolve this issue by submitting a Pull Request?
Issue Description
Different behavior from the connection manager
findmethod and the repositoryfindmethod.The repository
findmethod creates a query as expected with In clause, like:manager.getRepository(Entity).find({ foo: In(['bar', 'derp']) })SELECT * FROM entity WHERE foo IN ('bar','derp')On the other hand, the manager
findgenerates the following clause, like:manager.find(Entity,{ where: { foo: In(['bar', 'derp']) }})SELECT * FROM table WHERE foo = $1Expected Behavior
manager.find(Entity,{ where: { foo: In(['bar', 'derp']) }})generates
SELECT * FROM table WHERE foo = $1instead of
SELECT * FROM entity WHERE foo IN ('bar','derp')Actual Behavior
Described below.
Steps to Reproduce
// insert code hereMy Environment
Additional Context
Relevant Database Driver(s)
aurora-data-apiaurora-data-api-pgbetter-sqlite3cockroachdbcordovaexpomongodbmysqlnativescriptoraclepostgresreact-nativesapsqlitesqlite-abstractsqljssqlserverAre you willing to resolve this issue by submitting a Pull Request?