Hello all,
Probably a typical beginner's question...:
Is there an elegant way to filter a query on the size of a collection
property?
Something like this:
...
mapper(User, user_t, properties = { 'tickets' : relation(Ticket) })
mapper(Ticket, ticket_t)
...
session.query(User).filter(User.tickets.size > 1)
...
I would find it ideal if the argument of filter() did not contain a
direct reference to the metadata.
Best regards
-dh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---