Hi,
I am having a small issue with multiple python modules and declarative...
I might miss something but....
Consider:
a.py:
8<-------------------------------
Base = declarative_base()
class A(Base):
...
8<-------------------------------
b.py
Base = declarative_base()
class B(Base):
...
8<-------------------------------
c.py
Base = declarative_base()
class C(Base):
...
8<-------------------------------
d.py
Base = declarative_base()
from A import * # imports base....
from B import * # imports base....
from C import * # imports base....
Class D1(Base)
...
Class D2(A)
...
in d.py I want to create:
def create_tables(engine):
metadata= Base.metadata
metadata.create_all(engine)
Is there any way to properly "add" the metadata from the imported modules in
d.py to the Base.metadata during the import......?
Think of modules a,b,c and d are together in a package and d is imported with
similar packages into something bigger....
Martijn
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.