0
votes
1answer
42 views

Find value in an @Hash field type with mongodb-odm

I really new to mongoDb and I have a problem. i have this field in a collection: data: [ "data1", "data2" ] Why this query via console works : db.collection.find({'data': /data1/}) but this no? ...
2
votes
1answer
70 views

Fatal error: Class 'Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle' not found

I'm trying to install mongodb since 3 days but each time, I had a different error message until I fix some of them and I could install mongodb for my Symfony 2.1.4 installation. So now I have this ...
0
votes
1answer
102 views

Symfony 2.1 + @MongoDBUnique(fields=“email”) not unique

I'm trying to use MongoDB with Symfony2.1 but I'm facing a problem. I'm following the tutorial from Symfony website called "How to implement a simple Registration Form with MongoDB". In this ...
0
votes
0answers
240 views

Symfony2 access_control failed

I'm making a Symfony 2.1.x app using FOSUserBundle and FOSFacebookBundle. I have configured both bundles. When a register a new user, I can see on MongoDB the user I created. I want to create a new ...
0
votes
1answer
210 views

Best practice for mongodb bulk inserts in Symfony2

In my symfony2 command, I am running a script that inserts hundreds of thousands of urls (as string) into a document. Here are the basic structures of the 2 documents I'm using. Before the program is ...
0
votes
0answers
34 views

How to count with Doctrine MongoDB ODM? [duplicate]

Possible Duplicate: MongoDB ODM SELECT COUNT(*) equivalent I need to count the results for a given query, without retrieving the data for those results. Eg: 'count how many active users ...
0
votes
1answer
230 views

How to create Unique constraint object for form validation?

I need to add the constraints on the fly in the controller action, so I'm doing this: use Doctrine\Bundle\MongoDBBundle\Validator\Constraints\Unique; // ... $form = ...
1
vote
2answers
344 views

findBy reference doctrine-mongodb

I have collections of users and posts. User looks like { "_id" : ObjectId("5089cc4c7b03b9902b000000"), "facebook_id" : "522128874" } Post looks like { "_id" : ...
0
votes
1answer
170 views

How to create a WHERE … OR … query with MongoDB in Symfony2? [duplicate]

Inside my UserRepository I want to create custom queries, like the ones I can create with $dm->createQuery('some query') when not using MongoDB. How can I do this? I see that ...
0
votes
1answer
173 views

Can't use a Doctrine repository as user provider

I'm trying to create a custom user provider. I defined my UserProvider as a service: myvendor.user_provider: class: MyVendor\UserBundle\Service\Security\UserProvider This class is a ...
0
votes
0answers
129 views

Symfony and DoctrineMongoDB : dynamic connections

I have been searching for days for my issue... Context : I use Symfony, i have customers, and each customer has its own database. I have a master database with all logins of all my customers, which ...
0
votes
1answer
283 views

Doctrine MongoDB Hash type as enhancing key/value form in Symfony 2.1

I have a mapping in MongoDB as type hash, named "meta_info" which simply holds a key/value list of something, I'd like to make it to a form in Symfony2 which can be enhanced dynamically (with js), to ...
0
votes
1answer
136 views

How to add indexes to FOSUserBundle:User?

I noticed FOSUserBundle does not create any indexes. We are supposed to create a user Document like this: use FOS\UserBundle\Document\User as BaseUser; use Doctrine\ODM\MongoDB\Mapping\Annotations ...
0
votes
1answer
166 views

FOSUserBundle is querying twice to get the User

Check out lines #2 and #3 starting from bottom: [2012-09-11 16:44:55] event.DEBUG: Notified event "kernel.request" to listener ...
0
votes
1answer
67 views

Can there be an issue if Mongo class is instanced twice?

I want to use MongoDB for storing sessions, and I need to inject the \Mongo object into the session handler. I first thought I could fetch it from doctrine with something like this: services: ...
0
votes
1answer
176 views

Retrieve parent document with a doctrine2 or mongodb query

I am using Symfony 2.1 and Doctrine - MongoDBBundle. I have three documents. The first is a company, which I call "Institution". The second are contacts inside the institution, and the third are the ...
1
vote
1answer
1k views

Using mongodb for user authentication in symfony 2.1

With currented build of Symfony 2.1 it should be possible to use MongoDB as Userprovider for the SecurityBundle without using FOSUserBundle (as introduced here: mongodb symfony user authentication?). ...