I am working in doctrine ODM. I am new to doctrine.. Actually i am trying to delete all the data from a collection which are all inserted today using querybuilder. But i am not able to do that. Please help me on this. The querybuilder what i am trying to use is below,
.....->createQueryBuilder('Document')
->remove()
->field('active')->equals(1)
->where('createdOn')->equals(new MongoDate(date()))
->getQuery();