anchor.diff:  find(Conn, Type, Conditions, Max, Skip, Sort, SortOrder) when is_atom(Type), is_list(Conditions), 
                                                                 is_integer(Max), is_integer(Skip), 
                                                                 is_atom(Sort), is_atom(SortOrder) ->
  +%    ?LOG("find Type", Type),
  +%    ?LOG("find Conditions", Conditions),
       case model_is_loaded(Type) of
           true ->
               Collection = type_to_collection(Type),
  
positive.code:         {connection_failure, Reason} -> {error, Reason}
      end.
  
  save_record(Conn, Record) when is_tuple(Record) ->
      Type = element(1, Record),
      Collection = type_to_collection(Type),
      Attributes = case Record:id() of
          id ->
              PropList = lists:map(fun({K,V}) -> {K, pack_value(V)} end, 
                                   Record:attributes()),
              Tuple = proplist_to_tuple(proplists:delete(id, PropList)),
              Tuple;
          DefinedId when is_list(DefinedId) ->
              PropList = lists:map(fun({K,V}) ->
                              case K of 
                                  id -> {'_id', boss_to_mongo_id(DefinedId)};
                                  _ -> {K, pack_value(V)}
                              end
                      end, Record:attributes()),
              proplist_to_tuple(PropList)
  
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)))),
  