it doesn't produce as efficient of a SQL query, and requires that you set
"Type" manually on the object, but you can use a correlated subquery using this
form:
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
Can I use a field from a related table as the polymorphic descriminator?
This code no works:
http://pastebin.com/LtRC2tSR
Schematically:
class Reference:
reference_id
reference_name
class Parent:
parent_id
reference_id(ForeignKey='reference.reference_id')
reference = relatio