diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-09-15 17:42:16 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-09-15 17:42:16 -0400 |
| commit | 2ab0687ece8e027f31cc0861021ef040b90167a4 (patch) | |
| tree | 05eab1fb9b8a39ffd88f1a6ae8db17b59790e9b3 /lib/sqlalchemy/orm | |
| parent | 46196ea723484f354ac17204ccd489004baaac95 (diff) | |
| download | sqlalchemy-2ab0687ece8e027f31cc0861021ef040b90167a4.tar.gz | |
- add message to documentation stating that collection validators cannot
load the collection being validated. [ticket:1916]
Diffstat (limited to 'lib/sqlalchemy/orm')
| -rw-r--r-- | lib/sqlalchemy/orm/mapper.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index 9e38ac811..816bf95bf 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): |
