Do database modifications by id instead of the whole object.