mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
minor fixes;
This commit is contained in:
parent
20ebb08f2c
commit
7f192b6b5d
@ -120,12 +120,12 @@ export class RelationJoinColumnBuilder {
|
||||
}
|
||||
}
|
||||
});
|
||||
relationalColumn.build(this.connection.driver.namingStrategy);
|
||||
relation.entityMetadata.registerColumn(relationalColumn);
|
||||
}
|
||||
relationalColumn.referencedColumn = referencedColumn; // its important to set it here because we need to set referenced column for user defined join column
|
||||
relationalColumn.type = referencedColumn.type; // also since types of relational column and join column must be equal we override user defined column type
|
||||
relationalColumn.relationMetadata = relation;
|
||||
relationalColumn.build(this.connection.driver.namingStrategy);
|
||||
return relationalColumn;
|
||||
});
|
||||
}
|
||||
|
||||
@ -411,10 +411,14 @@ export class ColumnMetadata {
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
protected buildPropertyPath(): string {
|
||||
if (!this.embeddedMetadata || !this.embeddedMetadata.parentPropertyNames.length)
|
||||
return this.propertyName;
|
||||
let path = "";
|
||||
if (this.embeddedMetadata && this.embeddedMetadata.parentPropertyNames.length)
|
||||
path = this.embeddedMetadata.parentPropertyNames.join(".") + ".";
|
||||
|
||||
return this.embeddedMetadata.parentPropertyNames.join(".") + "." + this.propertyName;
|
||||
if (this.referencedColumn)
|
||||
path += this.referencedColumn.propertyName + ".";
|
||||
|
||||
return path + this.propertyName;
|
||||
}
|
||||
|
||||
protected buildDatabaseName(namingStrategy: NamingStrategyInterface): string {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user