** (Mix) Could not start application content: Content.Application.start(:normal, []) returned an error: bad child specification, more than one child specification has the id: Mongo.
If using maps as child specifications, make sure the :id keys are unique.
If using a module or {module, arg} as child, use Supervisor.child_spec/2 to change the :id, for example:
children = [
Supervisor.child_spec({MyWorker, arg}, id: :my_worker_1),
Supervisor.child_spec({MyWorker, arg}, id: :my_worker_2)
Currently, only one mongo repo can be supported, due to the child id is hardcoded to
Mongo
, see https://github.com/elixir-mongo/mongodb/blob/master/lib/mongo.ex#L143-L150. If we have multiple repos in one application, we'll get the following error:Interestingly, this was actually supported before, but the behavior was changed in https://github.com/elixir-mongo/mongodb/commit/efc4df444d255258d2a68c00efd52c594e7cb786, I'm not sure what was the intention there, but I guess there's no problem to add it back, if so I'll be happy to create a PR.