Bobby Impollonia wrote:
>
> Is there a video or slides from that pycon talk available online? I
> see the overview on the pycon site
> (http://us.pycon.org/2009/tutorials/schedule/2PM4/) and it looks very
> interesting.
>
> I looked more at what you said about the parent id column taking
> precedence and that does seem to be what happens. In particular, I see
> that the sql generated for
> session.query(Child1).filter( Child1.id.in_( range(5))) .count()
> uses the IN condition on parent.id in .53, whereas it was on the
> child1.id in .48. The .48 behavior seems better here. I can't think of
> a situation where I would say Child1.id and want it to use the column
> from the parent table instead of the child.
>
> Regardless, now that I understand what is happening, I will be able to
> get my application working on .53.

I dont recall the exact use cases that still require this.  the gist is if
you said :

session.query(Child.id, Child.name)

you'd probably want

"select id, name from parent"

instead of

"select child.id, parent.name from parent join child on ...."

that's not exactly the case where it comes into play, but its along those
lines.  Child.id really represents the "id" column of your "joined" table,
which is most prominently "parent.id".  Child is not the same as the
"child" table.    I can try changing the order of columns and see what the
unit tests say these days.



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to