summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/associationproxy.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-03-17 17:48:29 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-03-17 17:48:29 -0400
commit065fcbd9d2b463920d439c20d99a5a1cd7f216ed (patch)
tree2230349df4cc7bc884f128e2c463c2e334152b7e /lib/sqlalchemy/ext/associationproxy.py
parent95c0214356a55b6bc051d2b779e54d6de7b0b22e (diff)
downloadsqlalchemy-065fcbd9d2b463920d439c20d99a5a1cd7f216ed.tar.gz
- The official name for the relation() function is now
relationship(), to eliminate confusion over the relational algebra term. relation() however will remain available in equal capacity for the foreseeable future. [ticket:1740]
Diffstat (limited to 'lib/sqlalchemy/ext/associationproxy.py')
-rw-r--r--lib/sqlalchemy/ext/associationproxy.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/sqlalchemy/ext/associationproxy.py b/lib/sqlalchemy/ext/associationproxy.py
index b63bd9b00..c7437d722 100644
--- a/lib/sqlalchemy/ext/associationproxy.py
+++ b/lib/sqlalchemy/ext/associationproxy.py
@@ -30,13 +30,13 @@ def association_proxy(target_collection, attr, **kw):
always in sync with *target_collection*, and mutations made to either
collection will be reflected in both.
- Implements a Python property representing a relation as a collection of
+ Implements a Python property representing a relationship as a collection of
simpler values. The proxied property will mimic the collection type of
- the target (list, dict or set), or, in the case of a one to one relation,
+ the target (list, dict or set), or, in the case of a one to one relationship,
a simple scalar value.
- :param target_collection: Name of the relation attribute we'll proxy to,
- usually created with :func:`~sqlalchemy.orm.relation`.
+ :param target_collection: Name of the relationship attribute we'll proxy to,
+ usually created with :func:`~sqlalchemy.orm.relationship`.
:param attr: Attribute on the associated instances we'll proxy for.
@@ -44,7 +44,7 @@ def association_proxy(target_collection, attr, **kw):
by this proxy property would look like [getattr(obj1, *attr*),
getattr(obj2, *attr*)]
- If the relation is one-to-one or otherwise uselist=False, then simply:
+ If the relationship is one-to-one or otherwise uselist=False, then simply:
getattr(obj, *attr*)
:param creator: optional.
@@ -58,14 +58,14 @@ def association_proxy(target_collection, attr, **kw):
If you want to construct instances differently, supply a *creator*
function that takes arguments as above and returns instances.
- For scalar relations, creator() will be called if the target is None.
+ For scalar relationships, creator() will be called if the target is None.
If the target is present, set operations are proxied to setattr() on the
associated object.
If you have an associated object with multiple attributes, you may set
up multiple association proxies mapping to different attributes. See
the unit tests for examples, and for examples of how creator() functions
- can be used to construct the scalar relation on-demand in this
+ can be used to construct the scalar relationship on-demand in this
situation.
:param \*\*kw: Passes along any other keyword arguments to
@@ -84,7 +84,7 @@ class AssociationProxy(object):
target_collection
Name of the collection we'll proxy to, usually created with
- 'relation()' in a mapper setup.
+ 'relationship()' in a mapper setup.
attr
Attribute on the collected instances we'll proxy for. For example,
@@ -117,7 +117,7 @@ class AssociationProxy(object):
sniffing the target collection. If your collection type can't be
determined by duck typing or you'd like to use a different
collection implementation, you may supply a factory function to
- produce those collections. Only applicable to non-scalar relations.
+ produce those collections. Only applicable to non-scalar relationships.
proxy_bulk_set
Optional, use with proxy_factory. See the _set() method for
@@ -316,7 +316,7 @@ class _AssociationCollection(object):
lazy_collection
A callable returning a list-based collection of entities (usually an
- object attribute managed by a SQLAlchemy relation())
+ object attribute managed by a SQLAlchemy relationship())
creator
A function that creates new target entities. Given one parameter: