mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1494: Query results are overwritten by previous query. #1874
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?
Originally created by @doctrinebot on GitHub (Nov 15, 2011).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user monk.e.boy:
I am running a query that JOINs three tables, with a simple WHERE:
When I do this:
$b always has the wrong results. Running the following code:
BUG Results: $b != $z (getArrayResult IS CORRECT, it refreshes the results) Note: $a==$b (which is wrong)
Explanation:
There is a chapter table, this has a many-to-many join to notices (these are meta info
about the chapter -- a little like tagging a blog post) the notices are grouped into
categories.
Data model:
Data fixtures:
Initial investigation:
I think it has something to do with HINT_REFRESH ? Stepping through:
ObjectHydrator->_hydrateRow
ObjectHydrator->_getEntity
when it requests the Project_Model_Category from the unit of work, it
seems that the second query is simply grabbing the cached results from
the first results. This MUST be wrong as the second query uses a
different query (the ID changes) and all the results are wrong.
@doctrinebot commented on GitHub (Nov 15, 2011):
Comment created by @beberlei:
Fixed formatting
@doctrinebot commented on GitHub (Nov 18, 2011):
Comment created by @beberlei:
are you using result caching?
@doctrinebot commented on GitHub (Nov 21, 2011):
Comment created by monk.e.boy:
This is part of my bootstrap
,
,
@doctrinebot commented on GitHub (Dec 15, 2011):
Comment created by @beberlei:
Cannot reproduce it with the script attached. Can you try to modify this to fail or write your own testcase?
@doctrinebot commented on GitHub (Dec 15, 2011):
Comment created by @beberlei:
Downgraded
@doctrinebot commented on GitHub (Feb 9, 2013):
Comment created by @asm89:
Please provide extra feedback.
@doctrinebot commented on GitHub (Dec 13, 2015):
Imported 1 attachments from Jira into https://gist.github.com/569badd09f4b0e7bbb2c
@malukenho commented on GitHub (Jan 5, 2017):
@Ocramius @lcobucci can't reproduce bug with the provided file. Can be closed as invalid IMO as no feedback was provided since then.