From: Mike Bayer Date: Wed, 15 Sep 2010 21:42:16 +0000 (-0400) Subject: - add message to documentation stating that collection validators cannot X-Git-Tag: rel_0_6_5~63^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ab0687ece8e027f31cc0861021ef040b90167a4;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - add message to documentation stating that collection validators cannot load the collection being validated. [ticket:1916] --- 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):