Re: [sqlalchemy] ROLLBACK not happening with transaction in test suite

2018-06-01 Thread Mike Bayer
On Fri, Jun 1, 2018 at 4:54 PM, Scott Colby wrote: > Thanks for the information! Indeed, the workaround solved my problem. > > Is there a downside to unconditionally activating the workaround, or should > I check for use of pysqlite? i dont think there's much downside to it as long as you want

Re: [sqlalchemy] ROLLBACK not happening with transaction in test suite

2018-06-01 Thread Scott Colby
Thanks for the information! Indeed, the workaround solved my problem. Is there a downside to unconditionally activating the workaround, or should I check for use of pysqlite? from sqlite3 import Connection as _sqlite3_Connection from sqlalchemy import event as _event from sqlalchemy.engine

Re: [sqlalchemy] Relationship to non primary mapper with association proxy

2018-06-01 Thread Mike Bayer
On Thu, May 31, 2018 at 5:43 AM, Ashley Bye wrote: > I'm trying to create a relationship between two tables, but filtered based > on information from an association proxy. This seems to me a bit like a > relationship to a non-primary mapper >

Re: [sqlalchemy] three table join with confusing results

2018-06-01 Thread chbrnola
Simon, Think I figured out the issue, but no idea how to solve for it. In the DB I was using the Groups has a foreign key I didn't think was importnant and didn't include in the trimmed down example. So I was very confused when writing the file that the issue didn't repeat until I compared

Re: [sqlalchemy] three table join with confusing results

2018-06-01 Thread chbrnola
Simon, Will put a standalone script together, I'm using Flask-SQLAlchemy so it might vary some from standard SQLAlchemy, I'll post it in a few minutes, thanks! Carl On Friday, June 1, 2018 at 8:51:32 AM UTC-5, Simon King wrote: > > What does the SQL look like for each of your queries? > > Can

Re: [sqlalchemy] three table join with confusing results

2018-06-01 Thread Simon King
What does the SQL look like for each of your queries? Can you produce a standalone script that demonstrates the problem? You could use my script from https://groups.google.com/forum/#!topic/sqlalchemy/GNIBQMvMRg8 as a template. Thanks, Simon On Fri, Jun 1, 2018 at 2:41 PM wrote: > > I'm

[sqlalchemy] three table join with confusing results

2018-06-01 Thread chbrnola
I'm trying to join three tables in SQLAlchemy and while it works on joining and filtering with two of the tables the third one it only returns an arbitrary row (always the same one for some reason) and I'm completely confused about this behavior. Table classes: class Users(db.Model):