0
我試圖完成這樣的事情:Django:是否有in_查詢查詢模型對象,例如SQLAlchemy查詢?
userSelectionIDs = [pref.selectionID for pref in UserColumnSelectionPreference.objects.filter(user=reqUser).all()]
selections = ColumnSelections.objects.filter(id.in_(userSelectionIDs)).filter(type=2).all()
或者說,是對我有一個更好的方式來獲得該組的對象?