[PR #1060] [MERGED] [DDC-3170] SimpleObjectHydrator fails to get discriminator column from mapped SQL result #9105

Closed
opened 2026-01-22 16:03:13 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/1060
Author: @ureimers
Created: 6/17/2014
Status: Merged
Merged: 6/17/2014
Merged by: @guilhermeblanco

Base: masterHead: master


📝 Commits (2)

  • 7aa1c0a Create DDC3170Test.php
  • a7aa634 Fixed mapping of discriminator column

📊 Changes

2 files changed (+115 additions, -0 deletions)

View changed files

📝 lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php (+5 -0)
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3170Test.php (+110 -0)

📄 Description

This PR fixes DDC-3170.

When querying a simple entity which uses single table- or class table inheritance using simple object hydration (AbstractQuery::HYDRATE_SIMPLEOBJECT), the mapped discriminator column was not retrieved correctly.

If the column got an alias during result set mapping other than it's actual name (e.g. type34 instead of type) than this alias wasn't correctly resolved when retrieving the discriminator column from the SQL result set.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/1060 **Author:** [@ureimers](https://github.com/ureimers) **Created:** 6/17/2014 **Status:** ✅ Merged **Merged:** 6/17/2014 **Merged by:** [@guilhermeblanco](https://github.com/guilhermeblanco) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`7aa1c0a`](https://github.com/doctrine/orm/commit/7aa1c0a9078e33b201200acb024463cf611ec9b2) Create DDC3170Test.php - [`a7aa634`](https://github.com/doctrine/orm/commit/a7aa6342471d339930e66c374888cf93b823acf8) Fixed mapping of discriminator column ### 📊 Changes **2 files changed** (+115 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php` (+5 -0) ➕ `tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3170Test.php` (+110 -0) </details> ### 📄 Description This PR fixes [DDC-3170](http://www.doctrine-project.org/jira/browse/DDC-3170). When querying a simple entity which uses single table- or class table inheritance using simple object hydration (`AbstractQuery::HYDRATE_SIMPLEOBJECT`), the mapped discriminator column was not retrieved correctly. If the column got an alias during result set mapping other than it's actual name (e.g. `type34` instead of `type`) than this alias wasn't correctly resolved when retrieving the discriminator column from the SQL result set. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:03:13 +01:00
admin closed this issue 2026-01-22 16:03:13 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9105