Werner F. Bruhin wrote: > ... > > j3 = sao.outerjoin(db.Cellarbook, db.Cbvintage).outerjoin(db.Cbvintage, > db.Cbbottle) > print j3 > > j1 and j2 produce a join clause, but on j3 I get the following exception: > I different exception if I actually try to use j3:
I do this: wine = session.query(db.Cellarbook) j3 = sao.outerjoin(db.Cellarbook, db.Cbvintage).outerjoin(db.Cbvintage, db.Cbbottle) wine = wine.select_from(j3) Then I get this: Traceback (most recent call last): File "saTest.py", line 76, in <module> print wine File "c:\python25\lib\site-packages\sqlalchemy-0.5.0rc1-py2.5.egg\sqlalchemy\orm\query.py", line 1565, in __str__ return str(self._compile_context().statement) File "c:\python25\lib\site-packages\sqlalchemy-0.5.0rc1-py2.5.egg\sqlalchemy\sql\expression.py", line 1157, in __str__ return unicode(self.compile()).encode('ascii', 'backslashreplace') File "c:\python25\lib\site-packages\sqlalchemy-0.5.0rc1-py2.5.egg\sqlalchemy\sql\expression.py", line 1153, in compile compiler.compile() File "c:\python25\lib\site-packages\sqlalchemy-0.5.0rc1-py2.5.egg\sqlalchemy\sql\compiler.py", line 175, in compile self.string = self.process(self.statement) File "c:\python25\lib\site-packages\sqlalchemy-0.5.0rc1-py2.5.egg\sqlalchemy\sql\compiler.py", line 183, in process return meth(obj, **kwargs) File "c:\python25\lib\site-packages\sqlalchemy-0.5.0rc1-py2.5.egg\sqlalchemy\sql\compiler.py", line 498, in visit_select correlate_froms = set(sql._from_objects(*froms)) File "c:\python25\lib\site-packages\sqlalchemy-0.5.0rc1-py2.5.egg\sqlalchemy\sql\expression.py", line 886, in _from_objects return itertools.chain(*[element._get_from_objects(**kwargs) for element in elements]) File "c:\python25\lib\site-packages\sqlalchemy-0.5.0rc1-py2.5.egg\sqlalchemy\sql\expression.py", line 2412, in _get_from_objects return [self] + self.onclause._get_from_objects(**modifiers) + self.left._get_from_objects(**modifiers) + self.right._get_from_objects(**modifiers) AttributeError: type object 'Cbbottle' has no attribute '_get_from_objects' Werner --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---