summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Finkelstein <jeffrey.finkelstein@gmail.com>2016-05-03 20:46:20 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2016-05-04 15:54:49 -0400
commit4b1cba1c16d7f6666c7d574c985e1de760a713e4 (patch)
tree9f81054f9ee981ac5986588bb9bffa93b342ac2d
parent130d0d41cf6583ce00f8dfdc999076863b685049 (diff)
downloadsqlalchemy-4b1cba1c16d7f6666c7d574c985e1de760a713e4.tar.gz
Corrects some references in ORM documentation.
(cherry picked from commit e6251c3e40e623aaadc7356c0b3c94101710079c)
-rw-r--r--doc/build/faq/ormconfiguration.rst3
-rw-r--r--lib/sqlalchemy/orm/mapper.py18
2 files changed, 12 insertions, 9 deletions
diff --git a/doc/build/faq/ormconfiguration.rst b/doc/build/faq/ormconfiguration.rst
index 3a2ea29a6..faaee449e 100644
--- a/doc/build/faq/ormconfiguration.rst
+++ b/doc/build/faq/ormconfiguration.rst
@@ -89,7 +89,8 @@ To get at the :class:`.Mapper` for a particular mapped class, call the
mapper = inspect(MyClass)
-From there, all information about the class can be acquired using such methods as:
+From there, all information about the class can be accessed through properties
+such as:
* :attr:`.Mapper.attrs` - a namespace of all mapped attributes. The attributes
themselves are instances of :class:`.MapperProperty`, which contain additional
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py
index 97e46382d..2a1b9e619 100644
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -2052,7 +2052,7 @@ class Mapper(InspectionAttr):
.. warning::
- the :attr:`.Mapper.relationships` accessor namespace is an
+ The :attr:`.Mapper.attrs` accessor namespace is an
instance of :class:`.OrderedProperties`. This is
a dictionary-like object which includes a small number of
named methods such as :meth:`.OrderedProperties.items`
@@ -2098,14 +2098,15 @@ class Mapper(InspectionAttr):
.. warning::
- the :attr:`.Mapper.relationships` accessor namespace is an
+ The :attr:`.Mapper.all_orm_descriptors` accessor namespace is an
instance of :class:`.OrderedProperties`. This is
a dictionary-like object which includes a small number of
named methods such as :meth:`.OrderedProperties.items`
and :meth:`.OrderedProperties.values`. When
accessing attributes dynamically, favor using the dict-access
- scheme, e.g. ``mapper.attrs[somename]`` over
- ``getattr(mapper.attrs, somename)`` to avoid name collisions.
+ scheme, e.g. ``mapper.all_orm_descriptors[somename]`` over
+ ``getattr(mapper.all_orm_descriptors, somename)`` to avoid name
+ collisions.
.. versionadded:: 0.8.0
@@ -2145,8 +2146,8 @@ class Mapper(InspectionAttr):
@_memoized_configured_property
def relationships(self):
- """Return a namespace of all :class:`.RelationshipProperty`
- properties maintained by this :class:`.Mapper`.
+ """A namespace of all :class:`.RelationshipProperty` properties
+ maintained by this :class:`.Mapper`.
.. warning::
@@ -2156,8 +2157,9 @@ class Mapper(InspectionAttr):
named methods such as :meth:`.OrderedProperties.items`
and :meth:`.OrderedProperties.values`. When
accessing attributes dynamically, favor using the dict-access
- scheme, e.g. ``mapper.attrs[somename]`` over
- ``getattr(mapper.attrs, somename)`` to avoid name collisions.
+ scheme, e.g. ``mapper.relationships[somename]`` over
+ ``getattr(mapper.relationships, somename)`` to avoid name
+ collisions.
.. seealso::