[PR #27] [CLOSED] Fix attempt to get column by class property name #7616

Closed
opened 2026-01-22 15:56:01 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/27
Author: @dmdeller
Created: 1/13/2011
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • 32f16c7 Fix attempt to get column by class property name, which would fail when the two are different strings.

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 lib/Doctrine/ORM/Tools/SchemaTool.php (+1 -1)

📄 Description

Hi,

After upgrading from a Doctrine 2.0 RC to final version, I noticed a failure when using doctrine orm:schema:create:

  [Doctrine\DBAL\Schema\SchemaException]                 
  There is no column with name '_id' on table 'subuser'.

Since this worked before the upgrade, I investigated and found a new line of code that was attempting to get a column using the class identifier property name (_id) rather than the mapped column name (user_id). Please see patch.


🔄 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/27 **Author:** [@dmdeller](https://github.com/dmdeller) **Created:** 1/13/2011 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`32f16c7`](https://github.com/doctrine/orm/commit/32f16c7cb0b9f368b10bee9605bc41c009bef324) Fix attempt to get column by class property name, which would fail when the two are different strings. ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Tools/SchemaTool.php` (+1 -1) </details> ### 📄 Description Hi, After upgrading from a Doctrine 2.0 RC to final version, I noticed a failure when using doctrine orm:schema:create: ``` [Doctrine\DBAL\Schema\SchemaException] There is no column with name '_id' on table 'subuser'. ``` Since this worked before the upgrade, I investigated and found a new line of code that was attempting to get a column using the class identifier property name (_id) rather than the mapped column name (user_id). Please see patch. --- <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 15:56:01 +01:00
admin closed this issue 2026-01-22 15:56:01 +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#7616