From 7c39bd5c84867870bb76d3c60b29216f729d007e Mon Sep 17 00:00:00 2001 From: M1ha Date: Thu, 15 Nov 2018 13:03:24 +0500 Subject: [PATCH] BUG comment on update --- src/django_clickhouse/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/django_clickhouse/models.py b/src/django_clickhouse/models.py index 8c2643e..582b33c 100644 --- a/src/django_clickhouse/models.py +++ b/src/django_clickhouse/models.py @@ -89,6 +89,8 @@ class ClickHouseSyncBulkUpdateManagerMixin(BulkUpdateManagerMixin): class ClickHouseSyncQuerySetMixin: def update(self, **kwargs): + # BUG I use update_returning method here. But it is not suitable for databases other then PostgreSQL + # and requires django-pg-update-returning installed pk_name = self.model._meta.pk.name res = self.only(pk_name).update_returning(**kwargs).values_list(pk_name, flat=True) self.model.register_clickhouse_operations('update', *res, using=self.db)