I have a handful of relationships where there could be 100s of matching rows, but in most views I only want to see a subset of them. perhaps the most recent 5 items of 500 candidates..
to handle this so far, i've been constructing a join with correlated subquery. it works, but this doesn't seem efficient to write or execute. does anyone have an idea for a better approach? It feels wonky to reimplement similar queries so much in my model definition. i don't want to use `dynamic` loading, because that relationships strategy returns a query object and exposes a slightly different usage pattern.. for various compatibility reasons, I need the relationship attribute to represent a fully loaded collection. it can be view-only collection - but must be limited to a certain number of elements. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
