That's my point, foreign keys -do- work without problems even when you have
more than one declarative base. That is the only feature that I mean to
question. So my preferred SQLAlchemy style goes like so, with multiple
declarative_base() and never-bound metadata. It might be helpful to
remember that if you are using the ORM without declarative then you could
have zero declarative_base() instances.
DBSession = scoped_session(sessionmaker())
engine = create_engine(...)
DBSession.configure(bind=engine)
connection = DBSession.connection()
for base as (all declarative_base instances in dependency order):
base.metadata.create_all(connection)
# base.metadata.bind = no thanks
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/pylons-discuss/-/_xDKTduCt0AJ.
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/pylons-discuss?hl=en.