]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- add message to documentation stating that collection validators cannot
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 15 Sep 2010 21:42:16 +0000 (17:42 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 15 Sep 2010 21:42:16 +0000 (17:42 -0400)
load the collection being validated. [ticket:1916]

lib/sqlalchemy/orm/mapper.py

index 9e38ac8119ec59461b490acc0fe7e0a03fe84380..816bf95bf56332aa35a0508b7d18654f3759b121 100644 (file)
@@ -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):