mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fixed issues in the update by relation operation
This commit is contained in:
parent
0c20445d83
commit
2212868554
@ -306,7 +306,7 @@ export class PersistOperationExecutor {
|
||||
let tableName: string, relationName: string, relationId: any, idColumn: string, id: any;
|
||||
const relatedInsertOperation = insertOperations.find(o => o.entity === operation.targetEntity);
|
||||
const idInInserts = relatedInsertOperation ? relatedInsertOperation.entityId : null;
|
||||
if (operation.updatedRelation.isOneToMany) {
|
||||
if (operation.updatedRelation.isOneToMany || operation.updatedRelation.isOneToOneNotOwner) {
|
||||
const metadata = this.entityMetadatas.findByTarget(operation.insertOperation.entity.constructor);
|
||||
tableName = metadata.table.name;
|
||||
relationName = operation.updatedRelation.inverseRelation.name;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user