dgilland / alchy

The declarative companion to SQLAlchemy

Home Page:http://alchy.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Integrate ORM events into ModelBase

dgilland opened this issue · comments

http://docs.sqlalchemy.org/en/rel_0_9/orm/events.html

But allow an event decorator to function on class methods.

Something like:

class MyModel(Model):
    @event('before_insert', 'before_update'):
    def foo(...):
        ...

with automatic event registration.

Additional progress: c7b6aaa

Keeping this issue open as I may want to add ORM attribute event support.

This wraps it up: bc6e216