Make sure to rollback the session if an attribute cannot be set.