SQLAlchemy default filter

前端 未结 1 1041
猫巷女王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)
提交回复
热议问题