On Wed, May 30, 2018 at 3:17 PM, Derek Lambert
wrote:
> That's what I do in most circumstances. In this case I'm building a more
> complicated query and was hoping to do something like
>
> sess.query(Employee).filter(
> or_(
> and_(isclass(Manager), Manager.name.startswith('Jo')),
>
That's what I do in most circumstances. In this case I'm building a more
complicated query and was hoping to do something like
sess.query(Employee).filter(
or_(
and_(isclass(Manager), Manager.name.startswith('Jo')),
and_(isclass(Engineer),
Engineer.engineer_info.startswith('D
On Wed, May 30, 2018 at 12:39 PM, Derek Lambert
wrote:
> Outside of checking the discriminator value is it possible to filter a query
> by a class in an inheritance mapping?
>
> class Employee(Base):
> __tablename__ = 'employee'
> id = Column(Integer, primary_key=True)
> name = Column(
Outside of checking the discriminator value is it possible to filter a
query by a class in an inheritance mapping?
class Employee(Base):
__tablename__ = 'employee'
id = Column(Integer, primary_key=True)
name = Column(String(50))
type = Column(String(20))
__mapper_args__ = {