anchor.diff:                                                              fun chef_sql:select_rows/1)
                             end) of
           not_found ->
  -            throw({not_found, Name});
  +            not_found;
           #oc_chef_group{authz_id = AuthzId} ->
               AuthzId
       end;
   fetch_id(environment, DbContext, Name, OrgId) ->
       case chef_db:fetch(#chef_environment{org_id = OrgId, name = Name}, DbContext) of
           not_found ->
  -            throw({not_found, Name});
  +            not_found;
           #chef_environment{authz_id = AuthzId} ->
               AuthzId
       end.
  
positive.code:     % fetch does not handle cookbooks (and, well, versioning)
      case chef_db:fetch_latest_cookbook_version(DbContext, OrgName, Name) of
          not_found ->
              throw({not_found, Name});
          {cookbook_exists, AuthzId} ->
              % unclear when this can happen; I assume for wrong version but
              % won't happen with 'latest' version?  But still checking for it
  
negative.code: fetch_id(user, DbContext, Name, _OrgId) ->
      case chef_db:fetch(#chef_user{username = Name}, DbContext) of
          not_found ->
              not_found;
          #chef_user{authz_id = AuthzId} ->
              AuthzId
      end;
  fetch_id(client, DbContext, Name, OrgId) ->
      case chef_db:fetch(#chef_client{org_id = OrgId, name = Name}, DbContext) of
          not_found ->
              not_found;
          #chef_client{authz_id = AuthzId} ->
              AuthzId
      end;
  fetch_id(container, DbContext, Name, OrgId) ->
      case chef_db:fetch(#oc_chef_container{org_id = OrgId, name = Name}, DbContext) of
          not_found ->
              not_found;
          #oc_chef_container{authz_id = AuthzId} ->
              AuthzId
      end;
  fetch_id(data_bag, DbContext, Name, OrgId) ->
      case chef_db:fetch(#chef_data_bag{org_id = OrgId, name = Name}, DbContext) of
          not_found ->
              not_found;
          #chef_data_bag{authz_id = AuthzId} ->
              AuthzId
      end;
  fetch_id(node, DbContext, Name, OrgId) ->
      case chef_db:fetch(#chef_node{org_id = OrgId, name = Name}, DbContext) of
          not_found ->
              not_found;
          #chef_node{authz_id = AuthzId} ->
              AuthzId
      end;
  fetch_id(role, DbContext, Name, OrgId) ->
      case chef_db:fetch(#chef_role{org_id = OrgId, name = Name}, DbContext) of
          not_found ->
              not_found;
          #chef_role{authz_id = AuthzId} ->
              AuthzId
      end;
  