Background: Using core we have tables defined in a few separate files.
Goal: To have column defaults be selectables which reference other tables 
while avoiding circular imports. To avoid circular imports I cannot always 
build the selects at import time, they have to be generated inside a 
function that takes table/col names similar to how FKs work.

It seems that a callable for Column.default cannot return an uncompiled 
statement. Two solutions I see:

1) Use the context provided to default callables to compile the dynamic 
select statement.
2) Implement something similar to FKs, using all the parent attach events 
to set .arg to a selectable on a subclass of ColumnDefault.

Thoughts?

-- 
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 https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to