[PR #1086] [CLOSED] Failing test - getId() return string rather than integer #9138

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

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/1086
Author: @raziel057
Created: 7/22/2014
Status: Closed

Base: masterHead: id-as-string


📝 Commits (3)

  • 09567ad Failing test (get id return string type)
  • eb6f806 Create DDC3223Test.php
  • c9564c4 Delete DDC0003Test.php

📊 Changes

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

View changed files

tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3223Test.php (+103 -0)

📄 Description

Hi,

I found an issue in a specific case, when you find a child entity (JOINED) which is linked to another child entity.

If I clone the linked child entity and call getId(), it gives the value as 'string' rather than 'integer'. If I set the property id as public, there is no problem.

If I call getId on the child entity rather than the clone, it gives 'integer' as expected. So it's weird...

This simple test demonstrates the problem.


🔄 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/1086 **Author:** [@raziel057](https://github.com/raziel057) **Created:** 7/22/2014 **Status:** ❌ Closed **Base:** `master` ← **Head:** `id-as-string` --- ### 📝 Commits (3) - [`09567ad`](https://github.com/doctrine/orm/commit/09567adc368ef0430bc7473c5c9a225218c2cb65) Failing test (get id return string type) - [`eb6f806`](https://github.com/doctrine/orm/commit/eb6f8067b19f31ac34b7ae9587a1c0db6d10f2ec) Create DDC3223Test.php - [`c9564c4`](https://github.com/doctrine/orm/commit/c9564c43f70a5e6566fcd6cb794068f6c081ef13) Delete DDC0003Test.php ### 📊 Changes **1 file changed** (+103 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3223Test.php` (+103 -0) </details> ### 📄 Description Hi, I found an issue in a specific case, when you find a child entity (JOINED) which is linked to another child entity. If I clone the linked child entity and call getId(), it gives the value as 'string' rather than 'integer'. If I set the property id as public, there is no problem. If I call getId on the child entity rather than the clone, it gives 'integer' as expected. So it's weird... This simple test demonstrates the problem. --- <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:21 +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#9138