diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-09-21 12:12:01 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-09-21 12:12:01 -0400 |
| commit | 434efdd2d973b7d72963f52741a6d78bb46cf7b8 (patch) | |
| tree | b5af308f05ccb67619e2f02f920cb19462776259 /lib | |
| parent | 248cf4c5d2f227c7cc49772f023807aebeb5c969 (diff) | |
| download | sqlalchemy-434efdd2d973b7d72963f52741a6d78bb46cf7b8.tar.gz | |
mapper configured doc
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sqlalchemy/orm/events.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/events.py b/lib/sqlalchemy/orm/events.py index 61517770f..9132ef8fa 100644 --- a/lib/sqlalchemy/orm/events.py +++ b/lib/sqlalchemy/orm/events.py @@ -390,8 +390,16 @@ class MapperEvents(event.Events): def mapper_configured(self, mapper, class_): """Called when the mapper for the class is fully configured. - This event is the latest phase of mapper construction. - The mapper should be in its final state. + This event is the latest phase of mapper construction, and + is invoked when the mapped classes are first used, so that relationships + between mappers can be resolved. When the event is called, + the mapper should be in its final state. + + While the configuration event normally occurs automatically, + it can be forced to occur ahead of time, in the case where the event + is needed before any actual mapper usage, by using the + :func:`.configure_mappers` function. + :param mapper: the :class:`.Mapper` which is the target of this event. |
