If the id of a model is "id", then it inserts a new value into the database. Otherwise it updated the existing item.