anchor.diff:  			Else
   	end.
   
  +%% @hidden
   get_by_id(Type, Id) ->
   	case mnesia:read(Type, Id) of
   		[Rec] ->
  
positive.code: 			{error, {multiple, MultiRec}}
  	end.
  
  delete(Type, Id) ->
  	mnesia:delete({Type, Id}).
  
  search(Type, Params) ->
  	Matchspec = make_matchspec(Type, Params),
  	Recs = mnesia:select(Type, Matchspec),
  
negative.code: -export([check_setup/0]).
  -export([transaction/1, save/1, get_by_id/2, delete/2, search/2]).
  
  %% -----------------------------------------------------------------------
  %% API
  %% -----------------------------------------------------------------------
  
  %% @doc Ensure the mnesia schema and tables exist. Assumes a schema already
  %% exists.
  -spec check_setup() -> 'ok' | {'error', any()}.
  