Added support for events in ORM