whats the SA fix for this ? other than just documenting, say "join(foo, bar).join(bat)" instead of "join(foo, join(bar, bat))" ?On Jul 24, 2006, at 10:29 PM, Jonathan Ellis wrote: Looks like sqlite is allergic to the sql generated; works fine in postgres
[for test/orm/mapper.py again] def testjoin3tables(self): class Joined(object): pass j = join(users, join(orders, orderitems), isouter=True) m = mapper(Joined, j, allow_null_pks=True) q = create_session().query(m) q.select() SQLError: (OperationalError) no such column: orders.user_id 'SELECT users.user_id AS users_user_id, orders.user_id AS orders_user_id, orders.description AS orders_description, orders.isopen AS orders_isopen, orders.order_id AS orders_order_id, items.order_id AS items_order_id, items.item_name AS items_item_name, items.item_id AS items_item_id, users.user_name AS users_user_name \nFROM users LEFT OUTER JOIN (orders JOIN items ON orders.order_id = items.order_id) ON users.user_id = orders.user_id ORDER BY users.oid' []
A fellow on the sqlite list suggested a couple workarounds:
http://marc.10east.com/?t=115378699000001
-- Jonathan Ellis http://spyced.blogspot.com------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash Sqlalchemy-users mailing list |
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users