Combined update and add methods.