[DDC-1231] In ObjectHydrator->_getEntity(...) looking for the discriminator should be in uppercase Created: 27/Jun/11  Updated: 28/Jun/11  Resolved: 28/Jun/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.1
Fix Version/s: 2.1
Security Level: All

Type: Bug Priority: Blocker
Reporter: Alexandre Mathieu Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

On line 204:
$discrColumn = $this->_rsm->metaMappings[$this->_rsm->discriminatorColumns[$dqlAlias]];

$this->_rsm->discriminatorColumns[$dqlAlias] is in lowercase, whereas $this->_rsm->metaMappings[$this->_rsm->discriminatorColumns[$dqlAlias]] is in uppercase.

$discrColumn cannot be assigned.

A simple fix could be:
$discrColumn = $this->_rsm->metaMappings[strtoupper($this->_rsm->discriminatorColumns[$dqlAlias])];



 Comments   
Comment by Benjamin Eberlei [ 27/Jun/11 ]

What version of the code are you using? I fixed this problem yesterday on git master.

Comment by Alexandre Mathieu [ 27/Jun/11 ]

2.1.0RC1 downloaded this morning from the website.

Comment by Benjamin Eberlei [ 27/Jun/11 ]

ah yes, please update to Git Master then or wait for the RC2 release happening this week.

Comment by Benjamin Eberlei [ 28/Jun/11 ]

This was fixed on master

Generated at Wed Apr 16 13:20:50 UTC 2014 using JIRA 5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5.