I've been looking through the documentation (and Google) for how to set
on duplicate key update in the models. All I've seen is basically writing custom queries to do this, but I feel that there must be some behavior that can be set in the model initialization or similar. In my table, I have a
unique index (col1, col2), and basically, it only contains two values. If it does not exist, create it. If it exists, update
Can someone point me in the right direction?