Can I do
table.relationship.filter( column = value )
to get a subset of rows for relationships?  and the same for order_by?
relationship() with lazy='dynamic' option gives you a query (AppenderQuery object which  allows you to add/remove items), so you can .filter()/.filter_by() and .order_by() it.
According to the relationship() documentation, you can use order_by keyword argument with relationships, to set the order that will be returned. On the same page, it mentions that you can also use primaryjoin keyword argument to define extra join parameters. I think that can be used for the filter you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With