Hello,
I have the same error, as you, I can't find how to solve it, any idea?
doctrine_mongodb:
connections:
conn1:
server: mongodb://%mongourl%:27017
options:
connect: true
db: %mongo_db%
conn2:
server: mongodb://localhost:27017
options:
connect: true
db: %mongo_db%
default_database: %mongo_db%
default_commit_options: ~
default_connection: default
default_document_manager: default
document_managers:
default:
connection: conn1
mappings:
TravelyoCoreBundle: ~
metadata_cache_driver: array
writterdm:
connection: conn2
mappings:
TravelyoCoreBundle: ~
metadata_cache_driver: array
Thanks
On Tuesday, March 26, 2013 10:21:49 AM UTC+2, Jàπ (Jasper N. Brouwer) wrote:
>
> Hi Ariel,
>
> The config looks ok.
>
> How are you retrieving the service?
>
> If you do it like so (and use Symfony 2.1+):
> $this->get('doctrine.odm.mongodb')
>
> Change it to:
> $this->get('doctrine_mongodb')
>
>
> PS: You might want to add the db name to the connection options like so:
> doctrine_mongodb:
> connections:
> conn1:
> server: mongodb://localhost:27017
> options:
> connect: true
> db: videosStore
>
> --
> Jasper N. Brouwer
>
>
>
> On 25-03-2013, at 21:13, Ariel Isaac <[email protected] <javascript:>>
> wrote:
>
> > I just want to be able to access 2 differents databases, I want to
> access to documents from database called "videosStore" and "musicStore"
> which are 2 different databases.
> >
> > I write this configuration to config.yml
> >
> > doctrine_mongodb:
> > default_document_manager: dm2
> > default_connection: conn2
> > connections:
> > conn1:
> > server: mongodb://localhost:27017
> > options:
> > connect: true
> > conn2:
> > server: mongodb://localhost:27017
> > options:
> > connect: true
> > document_managers:
> > dm1:
> > connection: conn1
> > metadata_cache_driver: xcache
> > dm2:
> > connection: conn2
> > metadata_cache_driver: apc
> >
> > but I get this error:
> > Whoops, looks like something went wrong.
> >
> > 1/1 ServiceNotFoundException: The service
> "doctrine_mongodb.odm.conn1_connection" has a dependency on a non-existent
> service "doctrine_mongodb.odm.conn1_configuration".
> >
> >
> > I hope you can help me.
> >
> > Regards,
> > Ariel
>
>
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.