I don't get it... from the documentation link I was talking about,
User class was annotated with :

  /** @mongodb:Document(collection="users") */

I used this syntax ; you tell me this one is wrong ?


On 20 juin, 21:10, Christophe COEVOET <s...@notk.org> wrote:
> Le 20/06/2011 21:05, Adrien Mogenet a crit :
>
>
>
>
>
>
>
> > Hi everyone,
>
> > I'm still trying to query my MongoDB store thanks to symfony2 and
> > Doctrine ODM.
>
> > I'm following these instructions 
> > :http://symfony.com/doc/current/cookbook/doctrine/mongodb.html
>
> > So I tried :
> >   $dm = $this->get('doctrine.odm.mongodb.document_manager');
> >   $user = $dm->createQuery('find all from AcmeHelloBundle:User where id
> > = ?', $id);
>
> > And I got an "undefined method Doctrine\ODM\MongoDB
> > \DocumentManager::createQuery() ", so I tried with
> > "createQueryBuilder" but I got :
>
> >    The annotation "@mongodb:Document" in class MC\CardBundle\Document
> > \Card was never imported.
>
> This annotation is wrong. Look at the doc using the link you pasted to
> see the correct syntax. Once it is fixed you should be able to use the ODM.
>
> > I also tried this other mentionned query : $user = $dm-
> >> find('AcmeHelloBundle:User', $id);  but it gave me the same error
> > message.
> > And thus my question is : how the hell can I query my datastore ? :)
>
> > Regards,
>
> --
> Christophe | Stof

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to