Tag: ODM

Enforcing unique key constraints with Doctrine ODM for MongoDB & Symfony 2

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 […]

October 20 / 2010
Author Pablo
Category PHP, Symfony
Comments 1 Comment

New TLDs

NewTLDs

Upcoming Conferences

CraftingTour

CraftingTour

PHP New Zealand









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 […]

October 07 / 2010
Author Pablo
Category PHP, Symfony
Comments 1 Comment

New TLDs

NewTLDs

Upcoming Conferences

CraftingTour

CraftingTour

PHP New Zealand









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 […]

October 05 / 2010
Author Pablo
Category PHP, Symfony
Comments 1 Comment

New TLDs

NewTLDs

Upcoming Conferences

CraftingTour

CraftingTour

PHP New Zealand