SQLAlchemy default filter

前端 未结 1 1040
猫巷女王i
猫巷女王i 2021-01-01 15:46

I have a model with a field is_deleted, now I want all forms of query for this model to always filter by is_deleted=False in addition to whatever filtering arguments is pas

相关标签:
1条回答
  • 2021-01-01 16:18

    We have exactly this recipe here at https://github.com/sqlalchemy/sqlalchemy/wiki/FilteredQuery

    0 讨论(0)
提交回复
热议问题