]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
update docs for generic associations
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 28 Apr 2011 16:33:30 +0000 (12:33 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 28 Apr 2011 16:33:30 +0000 (12:33 -0400)
doc/build/orm/examples.rst
examples/generic_associations/__init__.py

index a9bcf56cc7b94dd609d0e2734cf813e3d9aa85e9..23140623249c917c257add48f855b037388208f4 100644 (file)
@@ -57,6 +57,15 @@ Location: /examples/dynamic_dict/
 
 .. automodule:: dynamic_dict
 
+.. _examples_generic_associations:
+
+Generic Associations
+--------------------
+
+Location: /examples/generic_associations
+
+.. automodule:: generic_associations
+
 .. _examples_sharding:
 
 Horizontal Sharding
@@ -90,9 +99,7 @@ Location: /examples/nested_sets/
 Polymorphic Associations
 ------------------------
 
-Location: /examples/poly_assoc/
-
-.. automodule:: poly_assoc
+See :ref:`examples_generic_associations` for a modern version of polymorphic associations.
 
 PostGIS Integration
 -------------------
index 7e94694fe0fc92dc90f7a537e0a614c720c3a0eb..b166d9161073087b20f52c67d4ed29daeb725d56 100644 (file)
@@ -4,14 +4,21 @@ parents with a particular child object.
 
 The examples all use the declarative extension along with 
 declarative mixins.   Each one presents the identical use
-case at the end - two clases, ``Customer`` and ``Supplier``, both
+case at the end - two classes, ``Customer`` and ``Supplier``, both
 subclassing the ``HasAddresses`` mixin, which ensures that the
 parent class is provided with an ``addresses`` collection
 which contains ``Address`` objects.
 
+The configurations include:
+
+* ``table_per_related.py`` - illustrates a distinct table per related collection.
+* ``table_per_association.py`` - illustrates a shared collection table, using a
+  table per association.
+* ``discriminator_on_association.py`` - shared collection table and shared
+  association table, including a discriminator column.
+
 The ``discriminator_on_association.py`` script in particular is a modernized
 version of the "polymorphic associations" example present in older versions of
-SQLAlchemy.
-
+SQLAlchemy, originally from the blog post at http://techspot.zzzeek.org/2007/05/29/polymorphic-associations-with-sqlalchemy/.
 
 """
\ No newline at end of file