On Apr 28, 2008, at 5:42 PM, Allen Bierbaum wrote:
So, if I understand this right, I could import a "base" module that
does a lazy creation of the Base class with a metadata object and then
just use that base class everywhere I need it for the declarative
class definitions. Then at a later time (before I use the mapped
classes), I could go and "bind" the metadata for the Base class to an
engine for use.
Correct? (I apologize if I used the terms incorrectly).
If this is true, then I think I see how I can solve my problem.
thats right. the whole idea of "declarative_base" is that its just a
common base class from which all your other classes inherit. then you
can plug whatever engine configuration is needed at any point in time
and it will become active for all base-inheriting classes.