I have a one-to-many relationship from parent to items. In my Parent class 
I define the items relationship like so:

items = relationship('Item')

I am using a soft-delete mechanism on items and I'd like to be able to 
filter this relationship so it only returns active items. It there a 
mechanism built-in to SQLAlchemy for filtering relationships? Something 
like this:

items = relationship('Item', filter_by='Item.deleted_at == None')

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/raEUiUviQNEJ.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to