Re: [sqlalchemy] Change in before_flush (maybe from 1.3 to 1.4?)

2021-09-09 Thread 'Jonathan Vanasco' via sqlalchemy
What version of 1.4 are you using? It is before 1.4.7? If so, please update to the latest (1.4.23 is current) There was a regression in some early 1.4s that affected flush/commit/transaction in some situations. That was solved in 1.4.7. On Thursday, September 9, 2021 at 8:52:59 AM UTC-4 Mike

Re: [sqlalchemy] Change in before_flush (maybe from 1.3 to 1.4?)

2021-09-09 Thread Mike Bayer
On Sun, Sep 5, 2021, at 6:41 PM, and...@acooke.org wrote: > > I'm having a hard time understanding some of my own code, which no longer > works. The only way I can see it having worked in the past is if > auto-flushing did not call before_flush, but commit did? Is that possible?

[sqlalchemy] Calculate rank of single row using subquery

2021-09-09 Thread Stephan Hügel
I'm trying to calculate the rank of a particular (unique) row id by using a subquery: I first calculate the total ranking for a table, Game (using 1.4.23): sq = ( session.query( Game.id, Game.score,