From: Mike Bayer Date: Thu, 9 Apr 2009 21:47:49 +0000 (+0000) Subject: - Fixed documentation for session weak_identity_map - X-Git-Tag: rel_0_5_4~29 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=0790f9c6acbe890ed3e344d43ca785853d958300;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Fixed documentation for session weak_identity_map - the default value is True, indicating a weak referencing map in use. --- diff --git a/CHANGES b/CHANGES index bd853aac4b..418e7c2f6b 100644 --- a/CHANGES +++ b/CHANGES @@ -31,6 +31,10 @@ CHANGES whereby a self referential relation from a base class to a joined-table subclass would not configure correctly. + + - Fixed documentation for session weak_identity_map - + the default value is True, indicating a weak + referencing map in use. - sql - ``sqlalchemy.extract()`` is now dialect sensitive and can diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index 954b313108..1e3a750d95 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -158,13 +158,13 @@ def sessionmaker(bind=None, class_=None, autoflush=True, autocommit=False, before each transaction is committed. weak_identity_map - When set to the default value of ``False``, a weak-referencing map is + When set to the default value of ``True``, a weak-referencing map is used; instances which are not externally referenced will be garbage collected immediately. For dereferenced instances which have pending changes present, the attribute management system will create a temporary strong-reference to the object which lasts until the changes are flushed to the database, at which point it's again dereferenced. Alternatively, - when using the value ``True``, the identity map uses a regular Python + when using the value ``False``, the identity map uses a regular Python dictionary to store instances. The session will maintain all instances present until they are removed using expunge(), clear(), or purge().