Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing schema for OracleDriver #6673

Merged
merged 1 commit into from Sep 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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