Add updateOrCreate() function
Merge pull request #4602 from lucasmichot/4.2-model-updateorcreate

[4.2] Add updateOrCreate() function