[sqlalchemy] Re: Relationship where relation is set by condition not present in table

2010-09-02 Thread cd34
% for job,progress in tmpl_context.jobs: error on my part after the outerjoin. Thanks for the pointers in the right direction. -- 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

[sqlalchemy] Re: Relationship where relation is set by condition not present in table

2010-09-02 Thread cd34
Just not having a lot of luck here. :) meta.Session.query(Job).order_by(Job.min_level).order_by(Job.descr).filter(Job.tier==1).outerjoin((User_job_progress, and_(User_job_progress.job_id==Job.job_id, User_job_progress.fb_uid==1))).all() results in: SELECT xxx_jobs.job_id AS xxx_jobs_job_id, xxx

[sqlalchemy] Re: Relationship where relation is set by condition not present in table

2010-09-02 Thread cd34
That was what I was missing. Thank you again. -- 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

Re: [sqlalchemy] Re: Relationship where relation is set by condition not present in table

2010-09-02 Thread Michael Bayer
On Sep 2, 2010, at 6:51 PM, cd34 wrote: > meta.Session.query(Job).order_by(Job.min_level).order_by(Job.descr).filter(Job.tier==1).outerjoin((User_job_progress, > User_job_progress.job_id==Job.job_id)).filter(User_job_progress.fb_uid==1) > > results in a query of: > > FROM xxx_jobs LEFT OUTER JO

[sqlalchemy] Re: Relationship where relation is set by condition not present in table

2010-09-02 Thread cd34
meta.Session.query(Job).order_by(Job.min_level).order_by(Job.descr).filter(Job.tier==1).outerjoin((User_job_progress, User_job_progress.job_id==Job.job_id)).filter(User_job_progress.fb_uid==1) results in a query of: FROM xxx_jobs LEFT OUTER JOIN xxx_user_job_progress ON xxx_user_job_progress.job_

[sqlalchemy] Re: Relationship where relation is set by condition not present in table

2010-08-31 Thread cd34
That's what I thought about 10 minutes after posting. I thought there might be a trick in the DeclarativeBase declaration that I missed. Thanks for the quick reply. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send emai