summaryrefslogtreecommitdiff
path: root/examples/polymorph/polymorph.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-03-20 01:16:16 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-03-20 01:16:16 +0000
commit865e2aaa19a1c4597b25c4ac0a090f7f3938bc20 (patch)
tree0da15458878e7450221e9c85be963a5d9a1946f5 /examples/polymorph/polymorph.py
parent8004a63d72b99a8e6c68aa1f7b4c637f577cf369 (diff)
downloadsqlalchemy-865e2aaa19a1c4597b25c4ac0a090f7f3938bc20.tar.gz
a few tweaks and the polymorph example can also use eager loading
Diffstat (limited to 'examples/polymorph/polymorph.py')
-rw-r--r--examples/polymorph/polymorph.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/polymorph/polymorph.py b/examples/polymorph/polymorph.py
index d240a55ac..804ef4e7a 100644
--- a/examples/polymorph/polymorph.py
+++ b/examples/polymorph/polymorph.py
@@ -71,7 +71,7 @@ person_join = select(
select(
[people, engineers.c.description, column("'engineer'").label('type')],
people.c.person_id==engineers.c.person_id)).alias('pjoin')
-
+
# lets print out what this Selectable looks like. The mapper is going to take the selectable and
# Select off of it, with the flag "use_labels" which indicates to prefix column names with the table
@@ -106,7 +106,7 @@ people_mapper = mapper(Person, person_join, extension=ext)
# (translation: it'll work)
# TODO: get the eager loading to work (the compound select alias doesnt like being aliased itself)
assign_mapper(Company, companies, properties={
- 'employees': relation(people_mapper, private=True)
+ 'employees': relation(people_mapper, lazy=False, private=True)
})
c = Company(name='company1')