[sqlalchemy] Re: inheritance and column_property() - subqueries are being limited

2010-08-05 Thread SQLAlchemy User
...and we're back to the same issue with another column_property: that is, How do you create column_properties with subqueries on child objects where the subquery references another child object? This: PC_avgdist_subq = select([func.avg(func.distance(PC.pt.RAW, Switch.pt.RAW))]).where(PC.switch_m

[sqlalchemy] Re: inheritance and column_property() - subqueries are being limited

2010-08-04 Thread SQLAlchemy User
...and I've figured out a workaround: in Switch(Device): pcs = relationship('PC', primaryjoin = 'Switch.mac == PC.switch_mac', lazy='dynamic') Now, switch.pcs.count() works :) S. On Aug 4, 5:00 pm, Zippy P wrote: > I have a single-table inheritance setup: > > class Device(Base): >   __tabl