diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2016-04-19 13:44:51 -0400 |
|---|---|---|
| committer | Gerrit Code Review <gerrit2@ln3.zzzcomputing.com> | 2016-04-19 13:44:51 -0400 |
| commit | 56dafa6c0dc1ebb7728a2120cce14f8227b2a97e (patch) | |
| tree | caf8f6f4e8a8235641c09c344a18180b7db0d81a /lib/sqlalchemy/orm/relationships.py | |
| parent | 6f6e2c48ba0be827ee434891f54eb2173edf9bfc (diff) | |
| parent | 33921261f8ebfd710ffa6e855d90c142ceb3303c (diff) | |
| download | sqlalchemy-56dafa6c0dc1ebb7728a2120cce14f8227b2a97e.tar.gz | |
Merge "Add raise/raiseload relationship loading strategy"
Diffstat (limited to 'lib/sqlalchemy/orm/relationships.py')
| -rw-r--r-- | lib/sqlalchemy/orm/relationships.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py index 17f94d4af..4d5e5d29d 100644 --- a/lib/sqlalchemy/orm/relationships.py +++ b/lib/sqlalchemy/orm/relationships.py @@ -540,6 +540,12 @@ class RelationshipProperty(StrategizedProperty): support "write-only" attributes, or attributes which are populated in some manner specific to the application. + * ``raise`` - lazy loading is disallowed; accessing + the attribute, if its value were not already loaded via eager + loading, will raise an :exc:`~sqlalchemy.exc.InvalidRequestError`. + + .. versionadded:: 1.1 + * ``dynamic`` - the attribute will return a pre-configured :class:`.Query` object for all read operations, onto which further filtering operations can be @@ -559,6 +565,8 @@ class RelationshipProperty(StrategizedProperty): :ref:`dynamic_relationship` - detail on the ``dynamic`` option. + :ref:`collections_noload_raiseload` - notes on "noload" and "raise" + :param load_on_pending=False: Indicates loading behavior for transient or pending parent objects. |
