I use symfony2 and mongodb, everything is fine until today, but I am creating a new document, and suddenly this error appears:
"MongoException: keys with zero length 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);
$customer OK, the repository is empty, and my document class is as follows:
private $id; private $tag; private $customer; private $points; private $viewed; private $brought; private $favorited; private $createdAt; private $updatedAt;
Can someone help me, have an idea, I tried everything, and nothing works
source share