After every update of my data in the log table, I want to insert an entry into another table. To achieve this, I have created an EntitySubscriberInterface. The event is triggering correctly, but the entity array does not include the updated id.
async afterUpdate(event: UpdateEvent<any>) {
console.log(event.entity);
const book = event.entity;
const authorId = book.authorId;
console.log(newAuthorId);
// this.myService.insertHistory(authorId , event.entity);
}
If anyone has any ideas or suggestions, they would be greatly appreciated. Thanks.