Query and examples for doctrine