Details
Description
When dealing with detached entities, e.g. with the QueryCache, you cannot use these entities as parameters for other Query.
Example:
Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
$em->detach($user);
$query = $em->createQuery('SELECT a FROM Address a WHERE a.User = ?1');
$query->setParameter(1, $user); // $user is detached
As $user is detached, the EntityManager does not have its identifier, so Query::_doExecute fails. (There is a "//TODO: Check that $value is MANAGED?" line near the failing line).
Activity
Nico Kaiser
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Attachment | ddc-822.patch [ 10819 ] |
Benjamin Eberlei
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Roman S. Borschel [ romanb ] | Benjamin Eberlei [ beberlei ] |
| Resolution | Fixed [ 1 ] |
Benjamin Eberlei
made changes -
| Workflow | jira [ 11968 ] | jira-feedback [ 14594 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback [ 14594 ] | jira-feedback2 [ 16458 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback2 [ 16458 ] | jira-feedback3 [ 18711 ] |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-822, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
This patch should fix Doctrine\ORM\Query to work with detached Entities.