summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sqlalchemy/orm/_orm_constructors.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/_orm_constructors.py b/lib/sqlalchemy/orm/_orm_constructors.py
index e68282865..6ef0a647f 100644
--- a/lib/sqlalchemy/orm/_orm_constructors.py
+++ b/lib/sqlalchemy/orm/_orm_constructors.py
@@ -724,11 +724,19 @@ def with_loader_criteria(
accepts a target class as an argument, when the given class is
a base with many different mapped subclasses.
+ .. note:: when the SQL expression is a lambda, **pickling is not
+ supported**. Set
+ :paramref:`_orm.with_loader_criteria.propagate_to_loaders`
+ to ``False`` to prevent the object from being applied to instances.
+
:param include_aliases: if True, apply the rule to :func:`_orm.aliased`
constructs as well.
:param propagate_to_loaders: defaults to True, apply to relationship
- loaders such as lazy loaders.
+ loaders such as lazy loaders. This indicates that the
+ option object itself including SQL expression is carried along with
+ each loaded instance. Set to ``False`` to prevent the object from
+ being assigned to individual instances.
.. seealso::