Hi Michael!

Am Dienstag, 29. Januar 2013, 12:23:01 schrieb Michael Bayer:
> … it's usually going to complicate
> things if you mix implicit and explicit joins together.   The issue should
> be solved if you create a clean string of joins:
> 
> s.query(results1.id, results2.id).select_from(results1).join(results2,
> results1.foo=results2.bar).join(...).join(...)

Thank you for the quick and helpful answer and the hint to select_from(); you 
are right that this solves my main problem (it does suffer from the same bad 
performance, but that's most likely a problem with my ERM).

> that way when you add another join to OutputParameterValue the query will
> not have any confusion in how to string this additional JOIN.

I am still not sure if this confusion isn't a bug or weakness in SA that 
should be either fixed or handled with a more explicit error message.

E.g. the join() could raise an error instead of silently throwing the first 
part of the FROM clause away.  (OTOH, I don't see why the latter has to happen 
in the first place.)

Thanks again, and have a nice day,
  Hans

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to