]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- document query_class on relationship
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 25 May 2011 00:31:44 +0000 (20:31 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 25 May 2011 00:31:44 +0000 (20:31 -0400)
- note public constructors for RelationshipProperty, ColumnProperty

lib/sqlalchemy/orm/__init__.py
lib/sqlalchemy/orm/properties.py

index 8a0312d5a91754bc0f96872e4220f814ec8b43a0..03612ac47a6cccd9891e2372c59edbb64a0123fc 100644 (file)
@@ -490,6 +490,13 @@ def relationship(argument, secondary=None, **kwargs):
       used for self-referential relationships, indicates the column or
       list of columns that form the "remote side" of the relationship.
 
+    :param query_class:
+      a :class:`.Query` subclass that will be used as the base of the
+      "appender query" returned by a "dynamic" relationship, that
+      is, a relationship that specifies ``lazy="dynamic"`` or was 
+      otherwise constructed using the :func:`.orm.dynamic_loader`
+      function.
+      
     :param secondaryjoin:
       a ColumnElement (i.e. WHERE criterion) that will be used as the join of
       an association table to the child object. By default, this value is
index cf059513f191fe374e2f83ecb2f18465d0d08cea..53fb5d85deabfd3ec70212f8781e67c8810bba8f 100644 (file)
@@ -31,11 +31,17 @@ from descriptor_props import CompositeProperty, SynonymProperty, \
             ComparableProperty,ConcreteInheritedProperty
 
 class ColumnProperty(StrategizedProperty):
-    """Describes an object attribute that corresponds to a table column."""
+    """Describes an object attribute that corresponds to a table column.
+    
+    Public constructor is the :func:`.orm.column_property` function.
+    
+    """
 
     def __init__(self, *columns, **kwargs):
         """Construct a ColumnProperty.
 
+        Note the public constructor is the :func:`.orm.column_property` function.
+
         :param \*columns: The list of `columns` describes a single
           object property. If there are multiple tables joined
           together for the mapper, this list represents the equivalent
@@ -168,6 +174,9 @@ log.class_logger(ColumnProperty)
 class RelationshipProperty(StrategizedProperty):
     """Describes an object property that holds a single item or list
     of items that correspond to a related database table.
+    
+    Public constructor is the :func:`.orm.relationship` function.
+    
     """
 
     def __init__(self, argument,