*I hope that you
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.
On 6/28/14, 7:13 AM, Bao Niu wrote:
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,
It is bad practice to use only one session in a web application.
It is standard practice to have one session for each web request.
Some good docs for you to read:
*
http://docs.sqlalchemy.org/en/latest/orm/session.html#when-do-i-construct-a-session-when-do-i-commit-it-and-when-do-i-close-it
*