EntityMetadata ignores Schemas for OracleDriver
See original GitHub issueIssue type:
[ ] question [X] bug report [ ] feature request [ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql
/ mariadb
[X] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[X] latest
[ ] @next
[ ] 0.x.x
(or put your version here)
Steps to reproduce or a small repository showing the problem:
I’m using the OracleDriver and after upgrading to the 0.2.19, the generated queries ignore the schemas defined on my Entity Definition.
Example Entity
import {
Column,
Entity,
PrimaryColumn,
} from "typeorm";
@Entity({
name: "PERSON",
schema: "DW_ADMIN"
})
export class Person {
@PrimaryColumn({ name: "ID" })
public id: number;
@Column({ name: "NAME" })
public name: string;
}
The resulting query:
SELECT "p"."ID" AS "p_ID", "p"."NAME" AS "p_NAME" FROM "PERSON"
The result is an oracle error because there is no schema attached to the table in the query
ORA-00942: table or view does not exist
Prior to upgrading the query was:
SELECT "p"."ID" AS "p_ID", "p"."NAME" AS "p_NAME" FROM "DW_ADMIN"."PERSON"
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
"Unable to connect to database as the schema user ...
The Upgrade Assistant (UA) Fails To Connect to the Portal Schema in ... The auto-datasource mode is ignoring data source XXX_PORTAL because ...
Read more >Spring JDBC Could not load JDBC driver class [oracle.jdbc ...
Make sure that you have ojdbc.jar gets added into your class path. If you want, you can also double check it by opening...
Read more >Using Oracle Database as a source for AWS SCT
You can use AWS SCT to convert schemas, database code objects, and application code from Oracle Database to the following targets:
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jf214 Just discovered that if you change your entities from saying
schema
todatabase
you can avoid this bugWe reverted to version 0.2.18 until this is resolved