File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ def __init__(self,
159159
160160 # the column name in the model definition
161161 self .column_name = None
162+ self ._partition_key_index = None
162163 self .static = static
163164
164165 self .value = None
Original file line number Diff line number Diff line change @@ -843,6 +843,7 @@ def _get_polymorphic_base(bases):
843843
844844 has_partition_keys = any (v .partition_key for (k , v ) in column_definitions )
845845
846+ partition_key_index = 0
846847 # transform column definitions
847848 for k , v in column_definitions :
848849 # don't allow a column with the same name as a built-in attribute or method
@@ -858,6 +859,9 @@ def _get_polymorphic_base(bases):
858859 if not has_partition_keys and v .primary_key :
859860 v .partition_key = True
860861 has_partition_keys = True
862+ if v .partition_key :
863+ v ._partition_key_index = partition_key_index
864+ partition_key_index += 1
861865 _transform_column (k , v )
862866
863867 partition_keys = OrderedDict (k for k in primary_keys .items () if k [1 ].partition_key )
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ class QueryException(CQLEngineException):
3737class IfNotExistsWithCounterColumn (CQLEngineException ):
3838 pass
3939
40+
4041class IfExistsWithCounterColumn (CQLEngineException ):
4142 pass
4243
You can’t perform that action at this time.
0 commit comments