Re: [sqlalchemy] Re: Deletion of a row from an association table

2020-08-15 Thread Simon King
SQLAlchemy normally presents a many-to-many relationship as a list on both sides. You've got "Machine.children", which is a list of Options, and "Option.parents", which is a list of Machines. If you remove one of the options from a machine.children list, you'll find that SQLAlchemy removes the

Re: [sqlalchemy] Flask SQlAlchemy BaseQuery Paginate not working correctly

2020-08-15 Thread Simon King
This is the same problem: you're writing a query that joins 3 tables together, and then applying a "LIMIT 20" to that query. If you look carefully at your 20 rows of psql output, I expect you'll see the same aggregates_id appear more than once. There are less than 20 distinct Aggregate objects.