summaryrefslogtreecommitdiff
path: root/examples/sharding/attribute_shard.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 /examples/sharding/attribute_shard.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 'examples/sharding/attribute_shard.py')
-rw-r--r--examples/sharding/attribute_shard.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/sharding/attribute_shard.py b/examples/sharding/attribute_shard.py
index 89d4243fc..352829cb6 100644
--- a/examples/sharding/attribute_shard.py
+++ b/examples/sharding/attribute_shard.py
@@ -2,7 +2,7 @@
# step 1. imports
from sqlalchemy import (create_engine, MetaData, Table, Column, Integer,
String, ForeignKey, Float, DateTime)
-from sqlalchemy.orm import sessionmaker, mapper, relation
+from sqlalchemy.orm import sessionmaker, mapper, relationship
from sqlalchemy.orm.shard import ShardedSession
from sqlalchemy.sql import operators
from sqlalchemy import sql
@@ -150,7 +150,7 @@ class Report(object):
# step 7. mappers
mapper(WeatherLocation, weather_locations, properties={
- 'reports':relation(Report, backref='location')
+ 'reports':relationship(Report, backref='location')
})
mapper(Report, weather_reports)