mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Hydrator giving wrong entity #5139
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 @AntonioCS on GitHub (Jun 4, 2016).
Hey,
I am working on a legacy symfony2 project with doctrine2 (components at the bottom)
I had to create a simple cache system using a table.
The table has the following data:
I have the following code to retrieve data (this is an internal method used by the public method fetch):
The problem I have is that given the following code:
I will ALWAYS get the value of the first fetch. In this case the value is 22222222222222222222 for all the calls.
I can see the query being formed in mysql log and the query is correct. If I grab the query from the log and run it in mysql I get the value I want.
From what I can see (using a debugger) is that on file vendor\doctrine\orm\lib\Doctrine\ORM\Persisters\BasicEntityPersister.php line 699 I get the wrong value. The code is:
What am I doing wrong here????
Here are my doctrine2 configs:
There are the doctrine components I am using:
@TomasVotruba commented on GitHub (Jun 4, 2016):
Not sure if it matters, but method name is
fetchEntity()and in the example code you usefetch().@Ocramius commented on GitHub (Jun 4, 2016):
@TomasVotruba marking it as "missing tests" - can't reproduce it with this info, sorry.
@Ocramius commented on GitHub (Jun 4, 2016):
Also,
doctrine/orm2.3.x is unmaintained: please upgrade