Is there some easy way how to create an event on doctrine entity? I would like to do some changes before entity is finaly saved into DB. For example i have entity with priority column and if i'm creating new record i need to get highest priority and set i into this new one.
Hi, if you have logic like this, you might wanna consider creating a new
service, and only this specific service would be used to save this specific
entity. And then in some
save method, you would generate the field
value, ideally in transaction.
But yes, there are for example EntityListeners.