Changed new_model to return the id of the newly-created model entry.