On Jan 30, 2010, at 1:05 PM, Kent wrote: > > p__a, od__a, p__b, and od__b are aliases I've defined in order to work > out this fairly complex query > > These joined aliases are being added to several of the outer selects > where I didn't intend for them. This is causing a cartesian product > and killing the query. > > Any ideas? (Instinct tells me you'd like a more concrete example, > which tables, mappers, objects, etc..., but I was hoping this may be > enough)
nothing comes to mind, except that its not surprising that use_ansi=False would fail on such a complex query. Its mechanism is not well tested, as I don't believe use_ansi=False mode is hardly ever used - it was more of a proof of concept sort of thing when SQLA was first created. If you can narrow the issue down, its likely related to nesting and probably over- or under-correlation as it appears there are extra tables being placed in FROM clauses, a common issue, although the extra criterion at the end involving these tables seems to imply a more serious issue. It also may be possible, if necessary, to make direct usage of the oracle._OuterJoinColumn construct to produce the (+) syntax directly, though this would require separate query construction in the case of Oracle 8. > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalch...@googlegroups.com. > To unsubscribe from this group, send email to > sqlalchemy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.