On Jul 13, 2013, at 1:48 AM, Ahmed <[email protected]> wrote: > Hello all, > > I have the following scenario: > I have 5 or 6 related sqlalchemy declarative models sitting in a pyramid app. > This occurs in the context of extending a pyramid application, where I > import/config.scan() these selected models from another pyramid app into a > new app. The thing is that these models have the original app's declarative > base and I need them to work with the new app's declarative base.
there's no reason you can't have multiple declarative bases, and those classes can still interact with each other. All you lose is that the two bases by default use a different MetaData registry and a different registry of string class names; but if these two bases are from different apps anyway, there should be few to no linkages between them. The use case of merging two apps together at runtime and swapping out bases seems very exotic. -- 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 http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/groups/opt_out.
