As a newcomer to TypeORM, I'm using Oracle DB with Node.js in the backend. Successfully connecting the database with TypeORM using createConnection()
, but struggling to specify the schema during connection creation.
One workaround is adding the schema to each entity like this:
@Entity({schema: "Users"})
However, this solution is not feasible as the schema may change based on the development/test/production environments. The only viable option seems to be specifying it during connection creation.
After reviewing the TypeORM connection options documentation at https://github.com/typeorm/typeorm/blob/master/docs/connection-options.md, it appears that while there's a schema
option for PostgreSQL and MySQL, there are no specific options listed for Oracle databases.