Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index annotation is not used properly #154

Closed
avalanche123 opened this issue Sep 2, 2011 · 6 comments
Closed

Index annotation is not used properly #154

avalanche123 opened this issue Sep 2, 2011 · 6 comments

Comments

@avalanche123
Copy link
Contributor

I have a problem with DoctrineMongoDBBundle
I have a document in my bundle that works fine without Index
but when I add index to the document's field , the app/console doctrine:mongodb:generate:documents throws exception

thanks
Saleh

<?php
namespace <Bundle>\Document;
use \Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
/**
 * @MongoDB\Document
 */
class Users
{
    /**
     * @MongoDB\Id
     */
    protected $id;
    /**
     * @MongoDB\Int @MongoDB\Index
     */
    public $uid;
    ...

the error


  [ErrorException]                                                                                                                                                                 &nbs p;                                                                                                                                                                    &nbs p;                                                                                                                                                                    &nbs p;     
  Catchable Fatal Error: Argument 1 passed to Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver::addIndex() must be an instance of Doctrine\ODM\MongoDB\Mapping\ClassMetadata, instance of Doctrine\ODM\MongoDB\Mapping\ClassMetadataInfo given, called in <PATH>/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/Mapping/Driver/AnnotationDriver.php on line 226 and defined in <PATH>/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/Mapping/Driver/AnnotationDriver.php line 260  
                                                                                                                                                                    &n bsp;                                                                                                                                                                    &n bsp;                                                                                                                                                                    &n bsp;                    

doctrine:mongodb:generate:documents [--document[="..."]] bundle

@kriswallsmith
Copy link
Contributor

Did you change your name Bulat?

@avalanche123
Copy link
Contributor Author

nah, this is from an email :)

@avalanche123
Copy link
Contributor Author

or rather - yes, call me Saleh now! ;)

@salehsed
Copy link

salehsed commented Sep 2, 2011

it's my problem :)

@inoryy
Copy link

inoryy commented Sep 13, 2011

any ETA on fix?

@salehsed
Copy link

any update ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants