My situation is like this: I am developing a web application, which has a Person class, which has *FirstName* and *LastName* attributes. Now I want to build their full name attribute and make this *full_name* attribute queriable, by using hybrid_property, which entails query and hence session. This session for querying hybrid_property has its life cycle as long as that particular Person instance is active in memory, as in the running process the names might get changed, and need to communicate to the database. In the mean time, in this application I also need another Session instance to contain those Person instances themselves, and this Session instance has a quite different life cycle than the above one. I am using cherrypy.request to hold a thread-local session for this second purpose.
Now it seems to me that both Session instances are necessary, I can't use one in place of the other. But because handling two sessions at the same time is inherently so confusing sometimes, I wonder if I am in the right direction? Is this generally considered bad? If it is, then how to deal with it? Thanks in advance. -- 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 sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.