summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/orm/util.py')
-rw-r--r--lib/sqlalchemy/orm/util.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py
index 63a2774b3..8e0fd44cd 100644
--- a/lib/sqlalchemy/orm/util.py
+++ b/lib/sqlalchemy/orm/util.py
@@ -1012,6 +1012,13 @@ class LoaderCriteriaOption(CriteriaOption):
argument. The given class will expand to include all mapped subclass
and need not itself be a mapped class.
+ .. note:: The :func:`_orm.with_loader_criteria` option only applies to
+ loader options that **render their own SQL**, which means it does
+ **not** apply to the :func:`_orm.contains_eager` option. To apply
+ additional criteria to the JOIN used in conjunction with
+ :func:`_orm.contains_eager`, specify additional criteria within
+ the :meth:`_sql.select.join` or :meth:`_orm.Query.join` method.
+
.. warning:: The use of a lambda inside of the call to
:func:`_orm.with_loader_criteria` is only invoked **once per unique
class**. Custom functions should not be invoked within this lambda.