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

2020-08-17 Thread Prerna Pandit
> LIMIT 20 > > If you run that in psql, I think you should get 20 *different* > aggregates rows back. > > If that works, then to turn it into SQLAlchemy ORM syntax, you should > use Query.exists(): > > > https://docs.sqlalchemy.org/en/13/orm/query.html#sqlal

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

2020-08-14 Thread Prerna Pandit
one-to-many relationship, because if you have > (for example) 2 "parent" objects, each with 5 "child" objects, the > query will return 10 rows, but SQLAlchemy de-duplicates the results to > return just the 2 parent objects. > > Simon > > On Thu, Aug

[sqlalchemy] Flask SQlAlchemy BaseQuery Paginate not working correctly

2020-08-13 Thread Prerna Pandit
Hello, I've been struggling with this issue for the past couple of days and would really, truly appreciate if someone could please give me pointers or direction as to what I might be missing. Here are my models; class Aggregate(db.Model): id = db.Column(UUID(as_uuid=True),