mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fixed issue when object is removed by cascades that are just loaded from db (no real entity)
This commit is contained in:
parent
393d3249b3
commit
0ac2d46efa
@ -103,7 +103,7 @@ export class Broadcaster {
|
||||
const subscribers = this.subscriberMetadatas
|
||||
.filter(subscriber => this.isAllowedSubscriber(subscriber, subject.entityTarget) && subscriber.beforeRemove)
|
||||
.map(subscriber => subscriber.beforeRemove!({
|
||||
entity: subject.entity,
|
||||
entity: subject.hasEntity ? subject.entity : undefined,
|
||||
databaseEntity: subject.databaseEntity,
|
||||
entityId: subject.metadata.getEntityIdMixedMap(subject.databaseEntity)
|
||||
}));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user