Entity Listener

In the most recent version of Cuba Platform i don’t have the option to create an Entity Listener in the Middleware section, instead i have the Event Listener but if i recall they aren’t the same thing.
I wanted to create an auto_increment using uniqueNumbersAPI and the onBeforeInsert, but in the Event Listener there isn’t any onBeforeInsert.
Thank you for your time.


EntityChangedEvent is now the recommended method, instead of the old Before/After Insert/Update/Delete Listeners.

If you want to use the old Entity Listener, you’ll have to write the code manually.

1 Like

You can use EntityPersistingEvent instead of the onBeforeInsert entity listener:

Thanks you, with your help i was able to make it work!