设置:问题: .filter(status = Blob.PLEASE_DELETE首先生成一个SELECT * from xxx_blob where ...查询,然后执行一个DELETE from xxx_blob where id in (BLAH);,其中BLAH是一个非常长的id列表。这是有原因的吗?我不明白为什么ORM不能将上面的代码片段转换为一个删除查询。
(alert_type=alert_type, entities__in=[entity[0] for entity in entities]).all()Distinct_Alert.objects.get_or_none(alert_type=alert_type, entities__in=[entity1, entity2...但是,随着错误的出现,get_or_none的定义如下
class Utility_Manager(models.M