Can I please get mapper definitions for this so that I can actually run this 
example, thanks.

Also make sure the issue still remains in current tip.


On Feb 15, 2013, at 9:34 AM, Chris <[email protected]> wrote:

> Hi
> 
> The following fails to work in 0.8b2 (Works fine in 0.7.9)
> 
> pp = aliased(PublicationPrice, name="pp")
> ppp= aliased(PublicationPrices, name="ppp")
> 
> session.query(pp, ppp).\
>               join(ppp, ppp.id == pp.publicationpricesid).\
>               filter(pp.publicationid == publicationid).all()
> 
> It generates the following SQL 
> 
> SELECT pp.id AS pp_id, pp.shopid AS pp_shopid, pp.publicationid AS 
> pp_publicationid, pp.publicationpricesid AS pp_publicationpricesid, pp.dayid 
> AS pp_dayid, pp.activedate AS pp_activedate, ppp.id AS ppp_id, ppp.shopid AS 
> ppp_shopid, ppp.publicationid AS ppp_publicationid, ppp.barcodeid AS 
> ppp_barcodeid, ppp.price AS ppp_price, ppp.onshelf AS ppp_onshelf, 
> ppp.offshelf AS ppp_offshelf, ppp.ean_issue AS ppp_ean_issue, ppp.cover_issue 
> AS ppp_cover_issue, ppp.dayid AS ppp_dayid, ppp.active AS ppp_active, 
> ppp.startdate AS ppp_startdate, ppp.stopdate AS ppp_stopdate, 
> ppp.cover_issue_next AS ppp_cover_issue_next, ppp.org_id AS ppp_org_id, 
> ppp.vat AS ppp_vat, ppp.barcodeidfull AS ppp_barcodeidfull, ppp.activedate AS 
> ppp_activedate, ppp.cost AS ppp_cost 
> FROM publicationprice AS pp INNER JOIN publicationprices AS ppp ON 
> publicationprices.id = pp.publicationpricesid 
> WHERE pp.publicationid = %s
> 
> The "publicationprices.id" in the ON Clause of the inner join is incorrect it 
> should be "ppp.id"
> 
> 
> Chris
> 
> -- 
> 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 http://groups.google.com/group/sqlalchemy?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
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 http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to