mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #213] [CLOSED] QueryBuilder::getQuery #7870
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/213
Author: @armetiz
Created: 12/9/2011
Status: ❌ Closed
Base:
master← Head:patch-5📝 Commits (1)
934e9bbQueryBuilder::getQuery📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
lib/Doctrine/ORM/QueryBuilder.php(+1 -1)📄 Description
Hi there,
I'm wondering myself if the QueryBuilder::getQuery is a good method name.
Actually, a getMethodObject makes me think that I can use many times the getMethodObject and work with the same object.
e.g :
In my code, the problem is that getQuery return a new instance of Query each time that I call getQuery.
Furthermore, the getQuery method invoke a createQuery method.
So, maybe the QueryBuiler::getQuery can store a reference to the created Query instance, and if the QueryBuilder::getQuery is call many times without any change return the stored instance.
If the QueryBuilder::getQuery have to generate a new Query, throw an exception or something like that.
Because of a change to QueryBuilder::createQuery is a major change, I don't think that It could be the solution, but it's a reflexion around this.
What do you think about that ?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.