Erlang Mongo repository