anchor.diff:          id ->
               PropList = lists:map(fun({K,V}) -> 
                               case is_id_attr(K) of
  -                                true -> {K, boss_to_mongo_id(V)};
  +                                true -> {K, pack_id(V)};
                                   false -> {K, pack_value(V)}
                               end
                   end, 
  
positive.code: 
  pop(_Conn, _Depth) -> ok.
  
  %%
  %% Internal functions
  %%
  
  boss_to_mongo_op(BossOperator) ->
      OperatorsMap = [
          {'not_equals', '$ne'},
          {'gt', '$gt'},
          {'ge', '$gte'},
          {'lt', '$lt'},
          {'le', '$lte'},
          {'in', '$in'},
          {'not_in', '$nin'}
      ],
      proplists:get_value(BossOperator, OperatorsMap).
  
  where_clause(Format, Params) ->
      erlang:iolist_to_binary(
                  io_lib:format(Format, Params)).
  
  multiple_where_clauses_string(Format, Key, ValueList, Operator) ->
      ClauseList = lists:map(fun(Value) ->
                  lists:flatten(io_lib:format(Format, [Key, Value]))
          end, ValueList),
          string:join(ClauseList, " " ++ Operator ++ " ").
  
  multiple_where_clauses(Format, Key, ValueList, Operator) ->
      erlang:iolist_to_binary(multiple_where_clauses_string(Format, Key,
              ValueList, Operator)).
  
  build_conditions(Conditions) ->
      proplist_to_tuple(build_conditions1(Conditions, [])).
  
negative.code: %    ?LOG("Condition", Condition),
      build_conditions1(Rest, lists:append(Condition, Acc)).
  
  where_clause(Format, Params) ->
      erlang:iolist_to_binary(
                  io_lib:format(Format, Params)).
  
  multiple_where_clauses_string(Format, Key, ValueList, Operator) ->
      ClauseList = lists:map(fun(Value) ->
                  lists:flatten(io_lib:format(Format, [Key, Value]))
          end, ValueList),
          string:join(ClauseList, " " ++ Operator ++ " ").
  
  multiple_where_clauses(Format, Key, ValueList, Operator) ->
      erlang:iolist_to_binary(multiple_where_clauses_string(Format, Key,
              ValueList, Operator)).
  
  
  %% 
  %% Boss models introspection
  %%
  
  attribute_names(Type) ->
      DummyRecord = apply(Type, new, lists:seq(1, proplists:get_value(new, Type:module_info(exports)))),
      DummyRecord:attribute_names().
  
  infer_type_from_id(Id) when is_list(Id) ->
      [Type, _BossId] = string:tokens(Id, "-"),
      {list_to_atom(Type), type_to_collection(Type), pack_id(Id)}.
  
  model_is_loaded(Type) ->
      case code:is_loaded(Type) of
  