[sqlalchemy] Re: filtering a query based on a relation attribute

2009-01-08 Thread sol
Option 2 works great. Thanks very much for your incredible support. On Jan 7, 3:13 pm, Michael Bayer wrote: > two choices.  join explicitly: > > query(Event).join(Event.message).filter(Message.text.match(x)) > > or use has() which produces an EXISTS subquery: > > query(Event).filter(Event.messag

[sqlalchemy] Re: filtering a query based on a relation attribute

2009-01-07 Thread Michael Bayer
two choices. join explicitly: query(Event).join(Event.message).filter(Message.text.match(x)) or use has() which produces an EXISTS subquery: query(Event).filter(Event.message.has(Message.text.match(x)) On Jan 7, 2009, at 1:23 PM, sol wrote: > > Using SA 0.5, sqlite, say I have the following