I'm using symfony2 and mongodb, until today, everything is OK, but I create a new document, and suddenly, appears this error :
"MongoException: zero-length keys are not allowed, did you use $ with double quotes?"
$dm = $this->get('doctrine.odm.mongodb.document_manager');
$_repo = $dm->getRepository('CantaoCustomerBundle:CustomerTags');
$_repo->findOneByCustomer($customer);
The $customer
it's OK, the repository is empty, and my document class is like this :
/**
* @MongoDB\ID
**/
private $id;
/**
* @MongoDB\ReferenceOne(targetDocument="Tapronto\Mats\ProductBundle\Document\Tag", cascade={"persist"})
**/
private $tag;
/**
* @MongoDB\ReferenceOne(targetDocument="Tapronto\Mats\CustomerBundle\Document\Customer", cascade={"persist"})
**/
private $customer;
/**
* @MongoDB\Float
**/
private $points;
/**
* @MongoDB\Int
**/
private $viewed;
/**
* @MongoDB\Int
**/
private $brought;
/**
* @MongoDB\Int
**/
private $favorited;
/**
* @MongoDB\Date
* @Gedmo\Timestampable(on="create")
**/
private $createdAt;
/**
* @MongoDB\Date
* @Gedmo\Timestampable(on="update")
**/
private $updatedAt;
Can anyone help me, have some idea, I tried everything and nothing seems to work