mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Empty ManyToMany collection after refresh inside PostPersist event #6692
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jsakars on GitHub (Apr 12, 2021).
Using v2.7.3 of this library, I have a following case:
Book) for which some DB value (number) is calculated using DB trigger => therefore I need to refresh the entity duringPostPersistevent in order to have the value available further down the path (e.g. to have it indexed in the Elasticsearch)Author) => for example oneAuthorcan have multipleBooksand vice versa$em->refresh($book)withinPostPersistListener ->$authorscollection is empty even though there are actual entries of course stored in the database evenOf course, I do have several 3rd party libraries (Gedmo Translatable, Blamable etc.) used which might have something to do with this.
What could be the cause of this?