I don't exactly understand how to search within the relations of a mapper object. It seems that whatever the search string is for a child object, the mapper always returns every object. Example: order_mapper = Order.mapper.options( eagerload('person'), eagerload('orderproducts'), eagerload('orderproducts.product')) orders = list(self.order_mapper.select( Person.c.firstname.like('%foo%'))) I get every order object returned this way, while I would expect to only see the objects returned with foo in their person's firstname. |
- [Sqlalchemy-users] Search Within Mapper Relations Koen Bok
- Re: [Sqlalchemy-users] Search Within Mapper Relations Michael Bayer