You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The schema from connection options is not set as the current schema
Expected Behavior
I would expect any query that I run via a QueryRunner or directly using the data source to be run in the schema that is set in the data source options (unless, of course, a SET SCHEMA statement is executed).
Actual Behavior
All queries are executed in the user's default schema, regardless of the schema set in data source options.
Steps to reproduce
constconnection=newDataSource({type: "sap",username: "MY_USER",schema: "MY_SCHEMA",
...
});awaitconnection.initialize();console.log(awaitconnection.query(`SELECT CURRENT_SCHEMA FROM SYS.DUMMY`);// returns MY_USER instead of MY_SCHEMA
My Environment
Dependency
Version
Operating System
any
Node.js version
20.10.0
Typescript version
5.3.3
TypeORM version
0.3.19
Additional Context
Since #10123 was merged, migrations and e.g. QueryRunner.createTable are no longer working when the schema is different than the user name.
Relevant Database Driver(s)
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
spanner
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
The text was updated successfully, but these errors were encountered:
Issue description
The schema from connection options is not set as the current schema
Expected Behavior
I would expect any query that I run via a QueryRunner or directly using the data source to be run in the schema that is set in the data source options (unless, of course, a SET SCHEMA statement is executed).
Actual Behavior
All queries are executed in the user's default schema, regardless of the schema set in data source options.
Steps to reproduce
My Environment
Additional Context
Since #10123 was merged, migrations and e.g.
QueryRunner.createTable
are no longer working when the schema is different than the user name.Relevant Database Driver(s)
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
The text was updated successfully, but these errors were encountered: