>
> ignore my previous email, this event handler should be failing,
> there's no after_create event for a mapped class. you'd want to
> put this on the Table for which the class is mapped. You don't need
> to use __declare_last__ as the Table can take these within the
> arguments:
>
> class MyClass:
> @declared_attr
> def __table_args__(cls):
> return (Index(...), {"listeners": [("after_create",
> my_create_event)]})
>
That seems to be working. I've got a new error that tells me I need to
insert the __tablename__ of
the subclass into my DDL statement. Does SqlAlchemy have a way to do this?
- Luke
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.