[DDC-1911] [GH-392] Replaced a shallow-copy with a deep-copy to avoid side effects. Created: 06/Jul/12  Updated: 22/Oct/13  Resolved: 08/Jul/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.3
Security Level: All

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of egeloen:

Url: https://github.com/doctrine/doctrine2/pull/392

Message:

Hey!

I'm currently using Symfony 2.1 + Doctrine master branch + Pager fanta master branch.

I'm facing a very vicious issue.

The doctrine paginator is able to clone a query with his `cloneQuery` method. This method will only clone the query without this parameters & hints. The issue is the parameters is setted with the `setParameters` method which will only affect the ArrayCollection reference to the new query builder and so, shared the reference between the two queries.

This PR will make a deep-copy of the ArrayCollection instead of a simple shallow-copy.

I'm not sure if this fix is the best solution.

Let me know if you need more information.



 Comments   
Comment by Benjamin Eberlei [ 08/Jul/12 ]

A related Github Pull-Request [GH-392] was closed
https://github.com/doctrine/doctrine2/pull/392

Comment by Doctrine Bot [ 22/Oct/13 ]

A related Github Pull-Request [GH-392] was closed:
https://github.com/doctrine/dbal/pull/392

Generated at Fri Oct 31 05:05:52 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.