Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Commit

Permalink
fix: sqlite connections don't ignore the schema property (typeorm#4599)
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-acumen authored and pleerock committed Sep 13, 2019
1 parent 0094f61 commit d8f1c81
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/metadata/EntityMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,10 @@ export class EntityMetadata {
*/
protected buildTablePath(): string {
let tablePath = this.tableName;
if (this.schema)
if (this.schema && ((this.connection.driver instanceof PostgresDriver) || (this.connection.driver instanceof SqlServerDriver))) {
tablePath = this.schema + "." + tablePath;
}

if (this.database && !(this.connection.driver instanceof PostgresDriver)) {
if (!this.schema && this.connection.driver instanceof SqlServerDriver) {
tablePath = this.database + ".." + tablePath;
Expand Down

0 comments on commit d8f1c81

Please sign in to comment.