From 2ab0687ece8e027f31cc0861021ef040b90167a4 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 15 Sep 2010 17:42:16 -0400 Subject: [PATCH] - add message to documentation stating that collection validators cannot load the collection being validated. [ticket:1916] --- lib/sqlalchemy/orm/mapper.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index 9e38ac8119..816bf95bf5 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -2373,6 +2373,11 @@ def validates(*names): can then raise validation exceptions to halt the process from continuing, or can modify or replace the value before proceeding. The function should otherwise return the given value. + + Note that a validator for a collection **cannot** issue a load of that + collection within the validation routine - this usage raises + an assertion to avoid recursion overflows. This is a reentrant + condition which is not supported. """ def wrap(fn): -- 2.47.2