DDC-867: QueryBuilder clone only does shallow clone #5389

doctrinebot opened this Issue Nov 8, 2010 · 2 comments

2 participants


Jira issue originally created by user blt04:

Cloning a QueryBuilder object only performs a shallow clone. This is problematic as object references in the dqlParts array stay the same in cloned copies of a QueryBuilder object.

For example, say I have a QueryBuilder object with two simple "andWhere" clauses. Now I clone the QueryBuilder instance and add a third "andWhere" clause to the cloned object. The 3rd andWhere clause will also appear in the original QueryBuilder object. The desired behavior is that the original QueryBuilder object is not modified when adding clauses to the cloned copy.


Comment created by @beberlei:



Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.0-RC1 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment