[sqlalchemy] Re: Can't figure out the joins across many tables with select_from()

2008-01-24 Thread Alexandre Conrad
Michael Bayer wrote: model.Player.query.join(['site', 'playlists', 'hotlinks', 'hotslot']).filter(model.SlotHot.c.id=='foo').all() another thing im considering, along the lines of what I mentioned in http://groups.google.com/group/sqlalchemy/browse_thread/thread/6b5b1cda1b657723# , would look

[sqlalchemy] Re: Can't figure out the joins across many tables with select_from()

2008-01-24 Thread Michael Bayer
On Jan 24, 2008, at 2:55 PM, Alexandre Conrad wrote: But these strings seem to be the relation names. And of course, my Site object doesn't have a 'site_client' as SiteClient uses inherits=Site directly in the mapper(). So it's like transparent and there are no way to get a grab of that

[sqlalchemy] Re: Can't figure out the joins across many tables with select_from()

2008-01-24 Thread Michael Bayer
On Jan 24, 2008, at 3:55 PM, Michael Bayer wrote: as we've said, many times, its not appropriate for SQLAlchemy to *guess* which particular subclass might have the site_client attribute you're looking for. if you would just set up select_table on your mapper, this whole issue goes away.

[sqlalchemy] Re: Can't figure out the joins across many tables with select_from()

2008-01-23 Thread Michael Bayer
On Jan 23, 2008, at 10:25 AM, Alexandre Conrad wrote: Hello, still working intensivly with joined table inheritance. I have troubles making a long join across many tables. I need to query players from player_table where on the other end, slots_hot.id == 'foo': player_table =

[sqlalchemy] Re: Can't figure out the joins across many tables with select_from()

2008-01-23 Thread Michael Bayer
On Jan 23, 2008, at 11:55 AM, Michael Bayer wrote: On Jan 23, 2008, at 10:25 AM, Alexandre Conrad wrote: model.Player.query.join(['site', 'playlists', 'hotlinks', 'hotslot']).filter(model.SlotHot.c.id=='foo').all() another thing im considering, along the lines of what I mentioned in