diff options
Diffstat (limited to 'examples/inheritance/polymorph.py')
-rw-r--r-- | examples/inheritance/polymorph.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/inheritance/polymorph.py b/examples/inheritance/polymorph.py index 872318060..87c2de10e 100644 --- a/examples/inheritance/polymorph.py +++ b/examples/inheritance/polymorph.py @@ -112,6 +112,14 @@ c = session.query(Company).get(1) for e in c.employees: print e +# illustrate querying using direct table access: + +print session.query(Engineer.engineer_name).\ + select_from(engineers).\ + filter(Engineer.primary_language=='python').\ + all() + + session.delete(c) session.commit() |