[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


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])];

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 Tue Oct 13 14:27:56 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.