django-cassandra-engine icon indicating copy to clipboard operation
django-cassandra-engine copied to clipboard

Django present BUG by non partition-key "get_pk_field"

Open mohsenjavidpanah opened this issue 6 years ago • 1 comments

Hi guys

I have problem by models that defined a clustering-key as get_pk_field in Meta class, Suppose a model by repetitious partition-key that first clustering-key is unique UUID, when i defined model partition-key as get_pk_field on the admin panel when i click on the item MultipleObjectsReturned error raising, and when i set clustering-key as get_pk_field, in results of queries partition-key value is equal to clustering key but in keyspace table these values are distinct.

mohsenjavidpanah avatar Apr 30 '18 12:04 mohsenjavidpanah

I have been observed this behaviour. The objects retrieved with .get (anyprimarykey=x) result in wrong partition key assignment, which copies the searched primary key value, and the real partition key value is missing from the object. This is a big issue with get clauses. It doesn`t happen with filter.

areyal avatar Jun 04 '18 21:06 areyal