I have idea to look for into the cache. I found a method :
getDoctrine_Odm_Mongodb_DocumentManagerService() ! Great !
Now i have a new problem when i try to test:
config.yml:
doctrine_odm.mongodb:
default_database: musik
default_connection: conn1
default_document_manager: dm1
metadata_cache_driver: apc
connections:
conn1:
server: mongodb://localhost:27017
options:
connect: true
document_managers:
dm1:
connection: conn1
$musik = new Categorie();
$musik->setIntitule("Musique");
$musik->setNumCds(3);
$musik->setNumArtiste(13);
$mongo = $this->container-
>getDoctrine_Odm_Mongodb_DocumentManagerService();
$mongo->persist($musik);
$mongo->flush();
I got this error:
Fatal error: Class 'Mongo' not found in C:\Users\Moi\Documents\devweb
\sandsf2\src\vendor\doctrine-mongodb\lib\Doctrine\ODM\MongoDB
\Mongo.php on line 46
On 17 sep, 12:21, spike3111 <[email protected]> wrote:
> Yes I have the latest version of the symfony sandbox, PR3, and it does
> not work.
>
> On 17 sep, 11:10, Henrik Bjornskov <[email protected]> wrote:
>
> > have you installed Doctrine ODM MongoDB ?
>
> > On Sep 17, 9:56 am, spike3111 <[email protected]> wrote:
>
> > > If I created a new instance of the new Symfony Bundle \ Bundle \
> > > DoctrineMongoDBBundle \ DoctrineMongoDBBundle (), and I start the
> > > console hello php / console, an error message
>
> > > C: \ Users \ Me \ Documents \ devweb \ sandsf2> hello php / console
> > > PHP Fatal error: Class 'Doctrine \ ODM \ MongoDB \ Tools \ Console \
> > > Command \ Schema \ CreateCommand' not found in C: \ Users \ Me \
> > > Documents \ devweb \ sandsf2 \ src \ vendor \ symfony \ src \ symfony
> > > \ Bundle \ DoctrineMongoDBBundle \ Command \
> > > CreateSchemaDoctrineODMCommand.php on line 18
>
> > > I think that the files have just been forgotten.
>
> > > Other problem:
>
> > > If a try to test this:
> > > (fromhttp://docs.symfony-reloaded.org/guides/doctrine/mongodb-odm/overview...)
> > > $dm =
> > > $this->container->getService('doctrine.odm.mongodb.document_manager');
>
> > > $dm->persist($user);
> > > $dm->flush();
>
> > > I have an error:
> > > Call to undefined method helloDevDebugProjectContainer::getService.
>
>
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en