anchor.diff:     {[]}.
   
   update_from_ejson(#oc_chef_group{name = OrigName, clients = OrigClients, users = OrigUsers, groups = OrigGroups} = Group, GroupData) ->
  -    error_logger:info_msg({update_from_ejson, Group}),
  +    error_logger:info_msg({update_from_ejson, Group, group_data, GroupData}),
       Name = ej:get({<<"groupname">>}, GroupData, OrigName),
  -    Clients = ej:get({<<"clients">>}, GroupData, OrigClients),
  -    Groups = ej:get({<<"groups">>}, GroupData, OrigGroups),
  -    Users = ej:get({<<"users">>}, GroupData, OrigUsers),
  -    Group#oc_chef_group{name = Name, clients = Clients, groups = Groups, users = Users}.
  +    Clients = ej:get({<<"actors">>, <<"clients">>}, GroupData, OrigClients),
  +    Groups = ej:get({<<"actors">>, <<"groups">>}, GroupData, OrigGroups),
  +    Users = ej:get({<<"actors">>, <<"users">>}, GroupData, OrigUsers),
  +    Result = Group#oc_chef_group{name = Name, clients = Clients, groups = Groups, users = Users},
  +    error_logger:info_msg({update_from_ejson_result, Result, Group =:= Result}),
  +    Result.
   
   fields_for_update(#oc_chef_group{last_updated_by = LastUpdatedBy,
                                        updated_at = UpdatedAt,
  
positive.code:     ok.
  
  new_record(OrgId, AuthzId, GroupData) ->
      Name = ej:get({<<"groupname">>}, GroupData),
      Id = chef_object_base:make_org_prefix_id(OrgId, Name),
      #oc_chef_group{id = Id,
                         authz_id = AuthzId,
  
negative.code: find_groups_names(GroupsAuthzIds, CallbackFun) ->
      query_and_diff_authz_ids(find_group_name_in_authz_ids, GroupsAuthzIds, <<"name">>, CallbackFun).
  
  find_client_authz_ids(ClientNames, OrgId, CallbackFun) ->
      find_authz_id_in_names(find_client_authz_id_in_names, [ClientNames], CallbackFun).
  
  find_group_authz_ids(GroupNames, OrgId, CallbackFun) ->
      find_authz_id_in_names(find_group_authz_id_in_names, [GroupNames], CallbackFun).
  
  find_user_authz_ids(UserNames, CallbackFun) ->
      find_authz_id_in_names(find_user_authz_id_in_names, [UserNames], CallbackFun).
  
  find_authz_id_in_names(QueryName, Args, CallbackFun) ->
      case CallbackFun({QueryName, Args}) of
          List when is_list(List) ->
              Flattened = lists:flatten(List),
              error_logger:info_msg({QueryName, Args, Flattened}),
              proplists:get_all_values(<<"authz_id">>, Flattened);
          not_found ->
              [];
  