Skip to content

Commit

Permalink
fix: add missing schema for OracleDriver (#6673)
Browse files Browse the repository at this point in the history
  • Loading branch information
pirouet committed Sep 6, 2020
1 parent 802e0f6 commit 8b8bc35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/metadata/EntityMetadata.ts
Expand Up @@ -6,6 +6,7 @@ import {PostgresDriver} from "../driver/postgres/PostgresDriver";
import {SapDriver} from "../driver/sap/SapDriver";
import {SqlServerConnectionOptions} from "../driver/sqlserver/SqlServerConnectionOptions";
import {SqlServerDriver} from "../driver/sqlserver/SqlServerDriver";
import {OracleDriver} from "../driver/oracle/OracleDriver";
import {CannotCreateEntityIdMapError} from "../error/CannotCreateEntityIdMapError";
import {OrderByCondition} from "../find-options/OrderByCondition";
import {TableMetadataArgs} from "../metadata-args/TableMetadataArgs";
Expand Down Expand Up @@ -709,7 +710,7 @@ export class EntityMetadata {
}

private getInverseEntityMetadata(value: any, relation: RelationMetadata): EntityMetadata {
const childEntityMetadata = relation.inverseEntityMetadata.childEntityMetadatas.find(metadata =>
const childEntityMetadata = relation.inverseEntityMetadata.childEntityMetadatas.find(metadata =>
metadata.target === value.constructor
);
return childEntityMetadata ? childEntityMetadata : relation.inverseEntityMetadata;
Expand Down Expand Up @@ -848,7 +849,7 @@ export class EntityMetadata {
*/
protected buildTablePath(): string {
let tablePath = this.tableName;
if (this.schema && ((this.connection.driver instanceof PostgresDriver) || (this.connection.driver instanceof SqlServerDriver) || (this.connection.driver instanceof SapDriver))) {
if (this.schema && ((this.connection.driver instanceof OracleDriver) || (this.connection.driver instanceof PostgresDriver) || (this.connection.driver instanceof SqlServerDriver) || (this.connection.driver instanceof SapDriver))) {
tablePath = this.schema + "." + tablePath;
}

Expand Down

0 comments on commit 8b8bc35

Please sign in to comment.