mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fix: inverse relation metadata not cyclic
This commit is contained in:
parent
a08ebbdea0
commit
50a660aecc
@ -581,6 +581,7 @@ export class RelationIdLoader {
|
||||
entities: ObjectLiteral[],
|
||||
relatedEntities?: ObjectLiteral[],
|
||||
) {
|
||||
const originalRelation = relation
|
||||
relation = relation.inverseRelation!
|
||||
|
||||
if (
|
||||
@ -611,7 +612,7 @@ export class RelationIdLoader {
|
||||
const primaryColumnName =
|
||||
joinColumn.entityMetadata.name +
|
||||
"_" +
|
||||
relation.inverseRelation!.propertyPath.replace(
|
||||
originalRelation.propertyPath.replace(
|
||||
".",
|
||||
"_",
|
||||
) +
|
||||
@ -636,7 +637,7 @@ export class RelationIdLoader {
|
||||
undefined,
|
||||
primaryColumn.entityMetadata.name +
|
||||
"_" +
|
||||
relation.inverseRelation!.propertyPath.replace(".", "_") +
|
||||
originalRelation.propertyPath.replace(".", "_") +
|
||||
"_" +
|
||||
primaryColumn.propertyPath.replace(".", "_"),
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user