Re: [sqlalchemy] replacing a filter attribute, or iterating over a booleanclauselist?

2016-03-03 Thread Brian Cherinka
Yeah, that might ultimately be the best way to go if things get too complicated. I think people might not want to re-run several lines of code to change some parameters but that could be a thing I make them just live with. On Thursday, March 3, 2016 at 3:06:57 AM UTC-5, Ladislav Lenart

Re: [sqlalchemy] Re: Assertion error on deleting one end of many-to-many relation

2016-03-03 Thread Mike Bayer
On 03/03/2016 07:36 AM, Lele Gaifax wrote: Simon King writes: In general I think it is not recommended to use "secondary" with a table that you have also mapped a class to. (eg. see the warning at the bottom of

Re: [sqlalchemy] I wish to know how I use table ALIAS in alchemy core

2016-03-03 Thread Simon King
On Thu, Mar 3, 2016 at 12:01 PM, Krishnakant wrote: > > > On Thursday 25 February 2016 03:50 PM, Simon King wrote: > > On Thu, Feb 25, 2016 at 9:43 AM, Krishnakant > wrote: > >> Hello, >> I have a query where there are 2 alias for a single table.

[sqlalchemy] Re: Assertion error on deleting one end of many-to-many relation

2016-03-03 Thread Lele Gaifax
Simon King writes: > In general I think it is not recommended to use "secondary" with a table > that you have also mapped a class to. (eg. see the warning at the bottom of > http://docs.sqlalchemy.org/en/rel_1_0/orm/basic_relationships.html#association-object > ). Thank

Re: [sqlalchemy] I wish to know how I use table ALIAS in alchemy core

2016-03-03 Thread Krishnakant
On Thursday 25 February 2016 03:50 PM, Simon King wrote: On Thu, Feb 25, 2016 at 9:43 AM, Krishnakant > wrote: Hello, I have a query where there are 2 alias for a single table. This is because the table contains a self

Re: [sqlalchemy] Assertion error on deleting one end of many-to-many relation

2016-03-03 Thread Simon King
On Thu, Mar 3, 2016 at 8:27 AM, Lele Gaifax wrote: > Hi all, > > I have a simple m2m relationship between two entities, with a secondary > table > in the middle. > > From the left item I need to read both the right items and the middle > ones, so > I have two relationships

[sqlalchemy] Assertion error on deleting one end of many-to-many relation

2016-03-03 Thread Lele Gaifax
Hi all, I have a simple m2m relationship between two entities, with a secondary table in the middle. >From the left item I need to read both the right items and the middle ones, so I have two relationships on the left entity. When I delete one left item, I get the following exception:

Re: [sqlalchemy] replacing a filter attribute, or iterating over a booleanclauselist?

2016-03-03 Thread Ladislav Lenart
Hello. I think it would be (much) easier to simply rebuild the query from scratch before each run. IMHO the time to build the query is not that big a factor to justify the added source code complexity. HTH, Ladislav Lenart On 3.3.2016 05:47, Brian Cherinka wrote: > > > well you need a