Reputation: 41
I have a CF, its PK is an UUID, I also have a column like regNum, it's a natural key. I do have an index on regNum.
Currently, whenever I try to insert a new record, I do a query on regNum to make sure there is no duplicate before generating an UUID for insertion.
However, I found out I do have duplicate regNum in this CF. Any idea how to prevent this? Thanks.
Upvotes: 0
Views: 1116
Reputation: 4792
Can you set regNum as your key instead of the UUID. That will solve your problem
Upvotes: 2