[email protected] wrote:
>
> Yup. We screwed up by using metadata.bind but I think we may be stuck
> with it.
why is that ? just detach it. Unless you have lots of
mytable.select().execute() types of statements going on, nothing will
really happen.
But also, if you are setting Session.bind/binds, it doesn't even matter.
Is it possible to bind a metadata collection within a
> session? i.e would session.configure(binds={metadata_collection_1 :
> e1, metadata_collection_2 : e2}) work? We would like to be able to
> bind groups of tables at the same time rather than doing them
> individually or having a single common bind for the session ... a lot
> of our applications access data across multiple data-servers and with
> multiple-logins
sure !
def bind_metadata_to_engine_in_my_session(engine, session, metadata):
session.configure(binds=dict((table, engine) for table in
metadata.tables.values()))
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---