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 album_id
> FROM soup JOIN (album JOIN vinyl ON vinyl.id = album.id) ON vinyl.id =
> soup.id
>
> How would you interpret this? Help much appreciated.


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, ...), ...)


just a little taste of my world !  :)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to