Creates Model.save method to allow updating / inserting into database.