I am also interested in having unrelated packages participate in the
SQLAlchemy session but unfortunately have not had the opportunity to write
and release those packages. A couple of SQLAlchemy notes:

It is not necessary for every mapped class to inherit from the same
declarative base class. For example, non-declarative models won't inherit
from any common base. There can be any number of declarative_base() classes.

It is convenient to have a common, threadlocal session. Especially for
query_property.
http://www.sqlalchemy.org/docs/orm/session.html#sqlalchemy.orm.scoping.ScopedSession.query_property

However, a class could be written as:

from sqlalchemy.orm.util import object_session
...
def do_something_with_session(self):
    object_session(self).query()...

- Daniel Holth

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-de...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to