From 065fcbd9d2b463920d439c20d99a5a1cd7f216ed Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 17 Mar 2010 17:48:29 -0400 Subject: - 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] --- examples/inheritance/polymorph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/inheritance/polymorph.py') diff --git a/examples/inheritance/polymorph.py b/examples/inheritance/polymorph.py index 4cf13985b..3ebcd6efe 100644 --- a/examples/inheritance/polymorph.py +++ b/examples/inheritance/polymorph.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 import sets # this example illustrates a polymorphic load of two classes @@ -61,7 +61,7 @@ mapper(Engineer, engineers, inherits=person_mapper, polymorphic_identity='engine mapper(Manager, managers, inherits=person_mapper, polymorphic_identity='manager') mapper(Company, companies, properties={ - 'employees': relation(Person, lazy=False, backref='company', cascade="all, delete-orphan") + 'employees': relationship(Person, lazy=False, backref='company', cascade="all, delete-orphan") }) session = create_session() -- cgit v1.2.1