]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Corrects some references in ORM documentation.
authorJeffrey Finkelstein <jeffrey.finkelstein@gmail.com>
Wed, 4 May 2016 00:46:20 +0000 (20:46 -0400)
committerJeffrey Finkelstein <jeffrey.finkelstein@gmail.com>
Wed, 4 May 2016 00:46:20 +0000 (20:46 -0400)
doc/build/faq/ormconfiguration.rst
lib/sqlalchemy/orm/mapper.py

index 3a2ea29a67d37aeb621d9ae2c14c065f7bef4c63..faaee449e91c36186624428aa83d639d79e4107f 100644 (file)
@@ -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
index 06d903e9cfbd4baf8d620ccb5fd88ad1c7d10600..858c35344738d7a889d56fc05618e5ef35acb1e0 100644 (file)
@@ -2121,7 +2121,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`
@@ -2167,14 +2167,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
 
@@ -2214,8 +2215,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::
 
@@ -2225,8 +2226,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::