Form @bajtos:
I'd like to discuss the naming scheme for these new methods (replaceOrCreate, replaceAttributes). I feel that replaceAttributes is not describing the intent precisely, and the difference between replaceAttributes and updateAttributes may not be clear enough.
At the moment, we have (among others):
MyModel.create
MyModel.updateOrCreate
myModelInstance.updateAttributes
myModelInstance.updateAttribute (a single attribute)
I am proposing to come up with new names while we are at adding support for REPLACE operations:
MyModel.create (remains same)
MyModel.patchOrCreate (with an alias MyModel.updateOrCreate for backwards-compatibility)
myModelInstance.patchAttributes (with an alias myModelInstance.updateAttributes for backwards-compatibility)
myModelInstance.updateAttribute
MyModel.replaceOrCreate
myModelInstance.replace or perhaps one of
myModelInstance.updateTo
myModelInstance.updateAllAttributes
myModelInstance.setTo
Form @bajtos: