On May 22, 2008, at 3:08 PM, Michael Bayer wrote:
> a1.join(a2, <onclause>) should do it. if not, supply a full test case
> and a description of the specific problem.
OK, I guess. So how do I see the SQL that gets generated?
I've tried this:
print select(from_obj=[a1.join(a2), a1.c.eid == a2.c.eid])
And get:
Traceback (most recent call last):
File "<console>", line 1, in ?
File "/Users/jeff/src/web/uuid-tg/lib/python2.4/site-packages/
SQLAlchemy-0.4.6-py2.4.egg/sqlalchemy/sql/expression.py", line 1136,
in __str__
return unicode(self.compile()).encode('ascii', 'backslashreplace')
File "/Users/jeff/src/web/uuid-tg/lib/python2.4/site-packages/
SQLAlchemy-0.4.6-py2.4.egg/sqlalchemy/sql/expression.py", line 1132,
in compile
compiler.compile()
File "/Users/jeff/src/web/uuid-tg/lib/python2.4/site-packages/
SQLAlchemy-0.4.6-py2.4.egg/sqlalchemy/sql/compiler.py", line 181, in
compile
self.string = self.process(self.statement)
File "/Users/jeff/src/web/uuid-tg/lib/python2.4/site-packages/
SQLAlchemy-0.4.6-py2.4.egg/sqlalchemy/sql/compiler.py", line 189, in
process
return meth(obj, **kwargs)
File "/Users/jeff/src/web/uuid-tg/lib/python2.4/site-packages/
SQLAlchemy-0.4.6-py2.4.egg/sqlalchemy/sql/compiler.py", line 491, in
visit_select
froms = select._get_display_froms(existingfroms)
File "/Users/jeff/src/web/uuid-tg/lib/python2.4/site-packages/
SQLAlchemy-0.4.6-py2.4.egg/sqlalchemy/sql/expression.py", line 3034,
in _get_display_froms
toremove = itertools.chain(*[f._hide_froms for f in froms])
AttributeError: '_BinaryExpression' object has no attribute
'_hide_froms'
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---