From: Mike Bayer Date: Fri, 4 May 2012 21:50:39 +0000 (-0400) Subject: doc update regarding with_lockmode, [ticket:2440] X-Git-Tag: rel_0_7_7~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac40c5afe55be66752926dfa565a84ae6ff44c2d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git doc update regarding with_lockmode, [ticket:2440] --- diff --git a/lib/sqlalchemy/orm/__init__.py b/lib/sqlalchemy/orm/__init__.py index ca4099d68d..41923c2b13 100644 --- a/lib/sqlalchemy/orm/__init__.py +++ b/lib/sqlalchemy/orm/__init__.py @@ -390,12 +390,14 @@ def relationship(argument, secondary=None, **kwargs): :param innerjoin=False: when ``True``, joined eager loads will use an inner join to join against related tables instead of an outer join. The purpose - of this option is strictly one of performance, as inner joins - generally perform better than outer joins. This flag can - be set to ``True`` when the relationship references an object - via many-to-one using local foreign keys that are not nullable, - or when the reference is one-to-one or a collection that is - guaranteed to have one or at least one entry. + of this option is generally one of performance, as inner joins + generally perform better than outer joins. Another reason can be + the use of ``with_lockmode``, which does not support outer joins. + + This flag can be set to ``True`` when the relationship references an + object via many-to-one using local foreign keys that are not nullable, + or when the reference is one-to-one or a collection that is guaranteed + to have one or at least one entry. :param join_depth: when non-``None``, an integer value indicating how many levels @@ -1673,4 +1675,4 @@ def undefer_group(name): return strategies.UndeferGroupOption(name) from sqlalchemy import util as _sa_util -_sa_util.importlater.resolve_all() \ No newline at end of file +_sa_util.importlater.resolve_all() diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index 2f1d9050f6..79ef423535 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -1106,7 +1106,7 @@ class Query(object): ``'update_nowait'`` - passes ``for_update='nowait'``, which translates to ``FOR UPDATE NOWAIT`` (supported by Oracle, - PostgreSQL) + PostgreSQL 8.1 upwards) ``'read'`` - passes ``for_update='read'``, which translates to ``LOCK IN SHARE MODE`` (for MySQL), and ``FOR SHARE`` (for