DDC-1717: Scalar mapping type conversion #2158

Closed
opened 2026-01-22 13:43:00 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Mar 21, 2012).

Jira issue originally created by user goetas:

After DDC657 is not possible to run queries like

SELECT count(u.id) as c FROM Users u GROUP BY u.id

At AbstractHydrator.php line 213
$this->_rsm->typeMappings[$key] is NULL so Type::getType throws an exception

i've fixed it doing
line 213

if ($this->_rsm->typeMappings[$key]){
    $cache[$key]['type']      = Type::getType($this->_rsm->typeMappings[$key]);
}

line 238

if($cache[$key]['type']){
    $value = $cache[$key]['type']->convertToPHPValue($value, $this->_platform);
}

the fix is too simple, probably could be done something better..

Originally created by @doctrinebot on GitHub (Mar 21, 2012). Jira issue originally created by user goetas: After DDC657 is not possible to run queries like `SELECT count(u.id) as c FROM Users u GROUP BY u.id` At AbstractHydrator.php line 213 `$this->_rsm->typeMappings[$key]` is NULL so Type::getType throws an exception i've fixed it doing line 213 ``` java if ($this->_rsm->typeMappings[$key]){ $cache[$key]['type'] = Type::getType($this->_rsm->typeMappings[$key]); } ``` line 238 ``` java if($cache[$key]['type']){ $value = $cache[$key]['type']->convertToPHPValue($value, $this->_platform); } ``` the fix is too simple, probably could be done something better..
admin added the Bug label 2026-01-22 13:43:00 +01:00
admin closed this issue 2026-01-22 13:43:01 +01:00
Author
Owner

@doctrinebot commented on GitHub (Mar 25, 2012):

Comment created by @FabioBatSilva:

Hi Asmir.

I can't reproduce.

Could you give more details ?

@doctrinebot commented on GitHub (Mar 25, 2012): Comment created by @FabioBatSilva: Hi Asmir. I can't reproduce. Could you give more details ?
Author
Owner

@doctrinebot commented on GitHub (Mar 26, 2012):

Comment created by goetas:

i can't reproduce too...
i've tried for some hours to reproduce this behaviour ... probably i've some mistake in different places of my code...

sorry

@doctrinebot commented on GitHub (Mar 26, 2012): Comment created by goetas: i can't reproduce too... i've tried for some hours to reproduce this behaviour ... probably i've some mistake in different places of my code... sorry
Author
Owner

@doctrinebot commented on GitHub (Mar 26, 2012):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Mar 26, 2012): Issue was closed with resolution "Invalid"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2158