For what it's worth, SQLAlchemy usually does add the join condition for
you, based on your relationship definitions. But the second parameter to
query.join() is an optional expression that *replaces* the join condition
that would normally be generated.

Simon

On Mon, Mar 21, 2016 at 5:42 PM, <[email protected]> wrote:

> Dear Simon,
>
> thanks. This works and look great. I should stick this code on my
> sleeping pillow. :D
>
> From viewpoint of SQL or the database this makes totally sense to me.
> But my fault (in thinking) was expect that the relationship()
> definitions I did in the classes would be enough for SQLA to know what
> I want. ;)
> I should never keep SQL out of my head.
>
> This will help me a lot in the future!
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to