On Thursday, December 12, 2013 8:56:10 AM UTC-8, Jonathan Vanasco wrote: > > i think the memoized properties are better too. i just wanted to expand > on something already in the docs. > > the only thing i'd note, is that it's recommended in the sqlalchemy docs > to do `session.remove()` , not `session.close()`, as a cleanup >
Session.remove() only works with session factories created via scoped_session(): >>> from sqlalchemy.orm import sessionmaker, scoped_session >>> Session = sessionmaker() >>> Session.remove Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'sessionmaker' object has no attribute 'remove' >>> Session = scoped_session(Session) >>> Session.remove <bound method scoped_session.remove of <sqlalchemy.orm.scoping.scoped_session object at 0x1047fa290>> -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
