Doctrine 2 - ORM

[GH-404] DDC-1933 - Fixing cloning of QueryBuilder and adding related tests