From d8f1c81dcfed33bf73493fccd162dff70f2679f9 Mon Sep 17 00:00:00 2001 From: Roman <52884896+roman-acumen@users.noreply.github.com> Date: Fri, 13 Sep 2019 18:12:23 +0300 Subject: [PATCH] fix: sqlite connections don't ignore the schema property (#4599) --- src/metadata/EntityMetadata.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/metadata/EntityMetadata.ts b/src/metadata/EntityMetadata.ts index 7335a45b4f..0d297fee00 100644 --- a/src/metadata/EntityMetadata.ts +++ b/src/metadata/EntityMetadata.ts @@ -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;