anchor.diff:                  ?NOT_CONTAINS_FORMAT, Key, ValueList, "&&"),
               [{'$where', WhereClause}];
           {'equals', Value} when is_list(Value) -> 
  -            [{Key, list_to_binary(Value)}];
  +            case is_id_attr(Key) of 
  +                true -> 
  +                    [{Key, boss_to_mongo_id(Value)}];
  +                false -> 
  +                    [{Key, list_to_binary(Value)}]
  +            end;
           {'not_equals', Value} when is_list(Value) -> 
               [{Key, {'$ne', list_to_binary(Value)}}];
           {'equals', {{_,_,_},{_,_,_}} = Value} -> 
  
positive.code:     lists:concat([Type, "-", binary_to_list(dec2hex(element(1, MongoId)))]).
  
  boss_to_mongo_id(BossId) ->
      [_, MongoId] = string:tokens(BossId, "-"),
      {hex2dec(MongoId)}.
  
  attr_value(id, MongoDoc) ->
      proplists:get_value('_id', MongoDoc);
  
negative.code:         true -> calendar:now_to_datetime(Value);
          false -> Value
      end;
  mongo_to_boss_value(AttrName, Value, _RecordType) ->
      case is_id_attr(AttrName) and (Value =/= "") of 
          true -> 
              IdType = id_type_from_foreign_key(AttrName),
              mongo_to_boss_id(IdType, Value);
          false -> 
              Value
      end.
  
  attribute_names(Type) ->
      DummyRecord = apply(Type, new, lists:seq(1, proplists:get_value(new, Type:module_info(exports)))),
  