Doctrine 2 - ORM

Exporting and restoring a query.