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/inheritance/single.py | |
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/inheritance/single.py')
-rw-r--r-- | examples/inheritance/single.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/inheritance/single.py b/examples/inheritance/single.py index 00feaefe8..29b214b20 100644 --- a/examples/inheritance/single.py +++ b/examples/inheritance/single.py @@ -1,5 +1,5 @@ from sqlalchemy import MetaData, Table, Column, Integer, String, ForeignKey -from sqlalchemy.orm import mapper, relation, create_session +from sqlalchemy.orm import mapper, relationship, create_session metadata = MetaData('sqlite://') metadata.bind.echo = 'debug' @@ -46,7 +46,7 @@ manager_mapper = mapper(Manager, inherits=person_mapper, polymorphic_identity='m engineer_mapper = mapper(Engineer, inherits=person_mapper, polymorphic_identity='engineer') mapper(Company, companies, properties={ - 'employees': relation(Person, lazy=True, backref='company') + 'employees': relationship(Person, lazy=True, backref='company') }) session = create_session() |