Attached you will find a diff to the polymorph test which shows that it
is only possible to do a query(cls).get(id) when using the base class
for 'cls'.
Shouldn't this be possible ?
Jürgen
--
---------------------------------------------------
Jürgen Kartnaller mailto:juergen_at_kartnaller.at
http://www.kartnaller.at
http://www.mcb-bregenz.at
---------------------------------------------------
Index: polymorph.py
===================================================================
--- polymorph.py (Revision 1504)
+++ polymorph.py (Arbeitskopie)
@@ -161,6 +161,17 @@
for e in c.employees:
print e, e._instance_key
+ employee_id = c.employees[0].person_id
+ employee_cls = c.employees[0].__class__
+
+ session.flush()
+ session.clear()
+
+ e = session.query(Person).get(employee_id)
+ e = session.query(employee_cls).get(employee_id)
+
+ c = session.query(Company).get(id)
+
session.delete(c)
session.flush()