summaryrefslogtreecommitdiff
path: root/examples/vertical
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 /examples/vertical
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 'examples/vertical')
-rw-r--r--examples/vertical/dictlike-polymorphic.py4
-rw-r--r--examples/vertical/dictlike.py10
2 files changed, 7 insertions, 7 deletions
diff --git a/examples/vertical/dictlike-polymorphic.py b/examples/vertical/dictlike-polymorphic.py
index a66576945..e4046b3ad 100644
--- a/examples/vertical/dictlike-polymorphic.py
+++ b/examples/vertical/dictlike-polymorphic.py
@@ -132,7 +132,7 @@ if __name__ == '__main__':
from sqlalchemy import (MetaData, Table, Column, Integer, Unicode,
ForeignKey, UnicodeText, and_, not_, or_, String, Boolean, cast, text,
null, case)
- from sqlalchemy.orm import mapper, relation, create_session
+ from sqlalchemy.orm import mapper, relationship, create_session
from sqlalchemy.orm.collections import attribute_mapped_collection
metadata = MetaData()
@@ -180,7 +180,7 @@ if __name__ == '__main__':
mapper(Animal, animals, properties={
- 'facts': relation(
+ 'facts': relationship(
AnimalFact, backref='animal',
collection_class=attribute_mapped_collection('key')),
})
diff --git a/examples/vertical/dictlike.py b/examples/vertical/dictlike.py
index 683eda029..ce76b3140 100644
--- a/examples/vertical/dictlike.py
+++ b/examples/vertical/dictlike.py
@@ -59,7 +59,7 @@ class VerticalPropertyDictMixin(object):
_property_mapping:
A string, the name of the Python attribute holding a dict-based
- relation of _property_type instances.
+ relationship of _property_type instances.
Using the VerticalProperty class above as an example,::
@@ -68,10 +68,10 @@ class VerticalPropertyDictMixin(object):
_property_mapping = 'props'
mapper(MyObj, sometable, properties={
- 'props': relation(VerticalProperty,
+ 'props': relationship(VerticalProperty,
collection_class=attribute_mapped_collection('key'))})
- Dict-like access to MyObj is proxied through to the 'props' relation::
+ Dict-like access to MyObj is proxied through to the 'props' relationship::
myobj['key'] = 'value'
# ...is shorthand for:
@@ -125,7 +125,7 @@ class VerticalPropertyDictMixin(object):
if __name__ == '__main__':
from sqlalchemy import (MetaData, Table, Column, Integer, Unicode,
ForeignKey, UnicodeText, and_, not_)
- from sqlalchemy.orm import mapper, relation, create_session
+ from sqlalchemy.orm import mapper, relationship, create_session
from sqlalchemy.orm.collections import attribute_mapped_collection
metadata = MetaData()
@@ -166,7 +166,7 @@ if __name__ == '__main__':
mapper(Animal, animals, properties={
- 'facts': relation(
+ 'facts': relationship(
AnimalFact, backref='animal',
collection_class=attribute_mapped_collection('key')),
})