diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-10-06 20:29:08 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-10-06 20:29:08 -0400 |
commit | 1b25ed907fb7311d28d2273c9b9858b50c1a7afc (patch) | |
tree | 74bd8df8638dbd1f1e48b1ca660963944be0be3d /lib/sqlalchemy/orm/properties.py | |
parent | d79e1d69a6b2d0d1cc18d3d9d0283ef4a77925bc (diff) | |
download | sqlalchemy-1b25ed907fb7311d28d2273c9b9858b50c1a7afc.tar.gz |
- merge ticket_1418 branch, [ticket:1418]
- The system of loader options has been entirely rearchitected to build
upon a much more comprehensive base, the :class:`.Load` object. This
base allows any common loader option like :func:`.joinedload`,
:func:`.defer`, etc. to be used in a "chained" style for the purpose
of specifying options down a path, such as ``joinedload("foo").subqueryload("bar")``.
The new system supersedes the usage of dot-separated path names,
multiple attributes within options, and the usage of ``_all()`` options.
- Added a new load option :func:`.orm.load_only`. This allows a series
of column names to be specified as loading "only" those attributes,
deferring the rest.
Diffstat (limited to 'lib/sqlalchemy/orm/properties.py')
-rw-r--r-- | lib/sqlalchemy/orm/properties.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index ef71d663c..c6eccf944 100644 --- a/lib/sqlalchemy/orm/properties.py +++ b/lib/sqlalchemy/orm/properties.py @@ -31,6 +31,8 @@ class ColumnProperty(StrategizedProperty): """ + strategy_wildcard_key = 'column' + def __init__(self, *columns, **kwargs): """Provide a column-level property for use with a Mapper. @@ -142,8 +144,9 @@ class ColumnProperty(StrategizedProperty): util.set_creation_order(self) self.strategy_class = self._strategy_lookup( - deferred=self.deferred, - instrument=self.instrument) + ("deferred", self.deferred), + ("instrument", self.instrument) + ) @property def expression(self): |