[sqlalchemy] Re: Absurd operational error in SQLite

2008-06-15 Thread Michael Bayer
What you're really doing here is creating a multiply inherited class on the SQL side, which is a use case SQLA was not at all designed to handle.So the fact that RatableRecord inherits from Soup here is not ideal since its really a (Ratable, Record). The specific concept we have no

[sqlalchemy] Re: Absurd operational error in SQLite

2008-06-14 Thread Malthe Borch
Michael Bayer wrote: oh. how are you getting it to join from soup- (album join vinyl) ? soup has a relation to album join vinyl and you're using query.join() ? it should be creating an aliased subquery for the right side of the join in that case. I thought 0.4 was able to do

[sqlalchemy] Re: Absurd operational error in SQLite

2008-06-13 Thread Michael Bayer
On Jun 13, 2008, at 5:43 AM, Malthe Borch wrote: When executing a query on some joined SQLA-mapper, SQLite throws the following exception (unlike Postgres, which handles it just fine): OperationalError: (OperationalError) no such column: album.id Here's the query: SELECT album.id AS

[sqlalchemy] Re: Absurd operational error in SQLite

2008-06-13 Thread Malthe Borch
Michael Bayer wrote: sqlite doesn't like the parenthesis. when making the joins with a SQLA join() construct, you need to make the joins from left to right, i.e.: soup.join(album, ...).join(vinyl, ...) as opposed to: soup.join(album.join(vinyl, ...), ...) Actually, we are sort

[sqlalchemy] Re: Absurd operational error in SQLite

2008-06-13 Thread Michael Bayer
On Jun 13, 2008, at 12:45 PM, Malthe Borch wrote: Actually, we are sort of doing this already --except-- due to your previous advice, we're now using the ``inherits``-option to automatically have SQLA figure out the correct unit-of-work order. With this option, the above join results in