Re: [sqlalchemy] Relationship between objects in different schemas

2016-10-22 Thread Mike Bayer
On 10/22/2016 08:08 AM, Nikola Radovanovic wrote: Hi all, I have a question regarding what will be the best possible way to resolve following scenario: 1. lets say I have table(s) in 'public' schema and multiple 'private' schemes with same table layout 2. each private schema is for

Re: [sqlalchemy] Using BakedQuery with joined subqueries

2016-10-22 Thread Mike Bayer
On 10/22/2016 05:55 AM, Anton Baranenko wrote: Hi all, I'd like to ask for your help with implementing the following. I have quite a complex query with subqueries generated in the application. In general the structure would look like this: draft_data = aliased( Draft.query.filter(

[sqlalchemy] Relationship between objects in different schemas

2016-10-22 Thread Nikola Radovanovic
Hi all, I have a question regarding what will be the best possible way to resolve following scenario: 1. lets say I have table(s) in 'public' schema and multiple 'private' schemes with same table layout 2. each private schema is for separate customer, and public contains some data

[sqlalchemy] Using BakedQuery with joined subqueries

2016-10-22 Thread Anton Baranenko
Hi all, I'd like to ask for your help with implementing the following. I have quite a complex query with subqueries generated in the application. In general the structure would look like this: draft_data = aliased( Draft.query.filter( Draft.author_user_id == drafts_from_user_id #