A couple of weeks ago we showed how you could set indexes in your MongoDB documents when using Doctrine ODM and Symfony2. Of course you can define unique indexes to prevent duplicate values and there are a couple of different syntax options to do so, which are clearly defined in the official documentation. But defining [...]
Tag: ODM
Creating indexes for your Doctrine ODM documents with Symfony 2
Creating indexes in NoSQL / Document-based databases is quite different compared to traditional relational databases. Since the former are schema-less (there is no table creation), indexes do not get created when the collection or the document is created or inserted. Here is a quick tip that will create all the indexes defined in your documents [...]
Logging MongoDB queries using Symfony 2 and Doctrine ODM
Symfony 2 comes with native support to connect to MongoDB using the DoctrineMongoDBBundle. Getting started is quite simple and there is not much that needs to be configured, but the manual does not say how to enable query logging although it is already possible with Symfony PR3. Query logging allows you to debug queries sent [...]




English
Español 
![php[tek] 2013](http://blog.servergrove.com/wp-content/uploads/2013/01/tek13.png)


