Skip to content

Loading…

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

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

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.

@doctrinebot

Comment created by @beberlei:

Fixed

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0-RC1 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.