[PROPOSAL] Model upsert() function

The function name is self-explanatory.