diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-17 17:48:29 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-17 17:48:29 -0400 |
| commit | 065fcbd9d2b463920d439c20d99a5a1cd7f216ed (patch) | |
| tree | 2230349df4cc7bc884f128e2c463c2e334152b7e /examples/large_collection | |
| parent | 95c0214356a55b6bc051d2b779e54d6de7b0b22e (diff) | |
| download | sqlalchemy-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 'examples/large_collection')
| -rw-r--r-- | examples/large_collection/__init__.py | 4 | ||||
| -rw-r--r-- | examples/large_collection/large_collection.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/large_collection/__init__.py b/examples/large_collection/__init__.py index a6c6179b8..3982f6799 100644 --- a/examples/large_collection/__init__.py +++ b/examples/large_collection/__init__.py @@ -1,8 +1,8 @@ """Large collection example. -Illustrates the options to use with :func:`~sqlalchemy.orm.relation()` when the list of related objects is very large, including: +Illustrates the options to use with :func:`~sqlalchemy.orm.relationship()` when the list of related objects is very large, including: -* "dynamic" relations which query slices of data as accessed +* "dynamic" relationships which query slices of data as accessed * how to use ON DELETE CASCADE in conjunction with ``passive_deletes=True`` to greatly improve the performance of related collection deletion. """ diff --git a/examples/large_collection/large_collection.py b/examples/large_collection/large_collection.py index c6adf1310..b8ade43ba 100644 --- a/examples/large_collection/large_collection.py +++ b/examples/large_collection/large_collection.py @@ -1,7 +1,7 @@ from sqlalchemy import (MetaData, Table, Column, Integer, String, ForeignKey, create_engine) -from sqlalchemy.orm import (mapper, relation, sessionmaker) +from sqlalchemy.orm import (mapper, relationship, sessionmaker) meta = MetaData() @@ -27,7 +27,7 @@ class Member(object): self.name = name mapper(Organization, org_table, properties = { - 'members' : relation(Member, + 'members' : relationship(Member, # Organization.members will be a Query object - no loading # of the entire collection occurs unless requested lazy="dynamic", |
