Doctrine, using count in postPersist will ignore inserted entity

After I insert a line in a table, I use postPersist event to count all entities that match my criteria. The problem is that the last inserted line is sometimes ignored. I tried to use postFlush event but there’s no way to know what are the flushed entities. Can anyone help me with a solution?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *