2024-05-12 09:51:18 发布
网友
我用Django定义了一个简单的模型。我想使用djangoselect_for_update方法选择一个对象,以确保数据持久性,因为多个线程需要更新单行但不同的列。但它给出了以下错误:
select_for_update
Obj = my_model.objects.select_for_update().filter(pk=1) AttributeError: 'Manager' object has no attribute 'select_for_update'
请帮我解决这个问题。谢谢
查看文档: https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.select_for_update
所以如果你必须升级你的django版本到开发版本!在
查看文档: https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.select_for_update
所以如果你必须升级你的django版本到开发版本!在
相关问题 更多 >
编程相关推荐