mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #392] [MERGED] Invalid paginator query cloning #8121
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/392
Author: @egeloen
Created: 7/6/2012
Status: ✅ Merged
Merged: 7/8/2012
Merged by: @beberlei
Base:
master← Head:patch-1📝 Commits (3)
996e47bReplaced a shallow-copy with a deep-copy to avoid side effects.8c24e52Clone directly the ArrayCollection instead of looping3bdf869Add clone query test📊 Changes
2 files changed (+14 additions, -1 deletions)
View changed files
📝
lib/Doctrine/ORM/Tools/Pagination/Paginator.php(+3 -1)📝
tests/Doctrine/Tests/ORM/Functional/PaginationTest.php(+11 -0)📄 Description
Hey!
I'm currently using Symfony 2.1 + Doctrine master branch + Pager fanta master branch.
I'm facing a vicious issue.
The doctrine paginator is able to clone a query with his
cloneQuerymethod. This method will only clone the query without this parameters & hints. The issue is the parameters is setted with thesetParametersmethod which will only affect the ArrayCollection reference to the new query and so, shared the reference between the two queries.This PR will clone the ArrayCollection instead of simply affect it.
Let me know if you need more information. :)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.