the before_parent_attach() event could do this, sure.  Might be a little tricky:

http://docs.sqlalchemy.org/en/rel_0_9/core/events.html?highlight=before_parent_attach#sqlalchemy.events.DDLEvents.before_parent_attach

Richard Gerd Kuesters | Pollux <rich...@pollux.com.br> wrote:

> hi all!
> 
> i remember bumping into this somewhere, but now that i need it, i can't find. 
> Murphy ... well, here's the question:
> 
> * the company i work have a certain "convention" on naming columns in the 
> database level, like "dt_" for datetime, "u_" for unicode, "ut_" for 
> unicodetext, and so on.
> 
> the question is, can't I use a event listener to do this by my own? a type is 
> bound to a format, it's quite simple dict. example:
> 
>     ...
>     last_update = Column("dt_last_update", DateTime, on_update=func, 
> default=func)
>     ...
> 
> To:
> 
>     ...
>     last_update = Column(DateTime, on_update=func, default=func)  # 
> "dt_last_update" is automatically created since it's a DateTime type (at the 
> database level only)
>     ...
> 
> 
> best regards,
> richard.
> 
> -- 
> 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 sqlalchemy+unsubscr...@googlegroups.com.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to