[PR #1097] [CLOSED] [DDC-3239] [Test] Failing test, comments wanted; do not merge. expandParameters/getType in BasicEntityPersister seems to really cover just few cases #9150

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

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/1097
Author: @kamazee
Created: 8/1/2014
Status: Closed

Base: masterHead: fetching_by_custom_type_property


📝 Commits (1)

  • c731cbe Add failing test case for loading relation

📊 Changes

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

View changed files

tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3239Test.php (+156 -0)

📄 Description

The test case below seems fairly simple, but I believe that it might uncover a bigger issue.

Attached test fails: one record is expected, none records are returned. The problem looks rather simple: custom type is ignored and entity persister tries to load relation using PHP value, not a database one.

It seems odd that getType (and, hence, expandParameters) in BasicEntityPersister clearly expects field name but often gets different things.

Just set a breakpoint there and watch values through the test suite. There might be not just field name, but a column with alias as well. This works (note variables at the bottom):
screenshot from 2014-08-01 14 03 44

But this, apparently, doesn't:
screenshot from 2014-08-01 14 07 29

There are multiple places (more than one) that call expandParameters with criteria that can't be resolved with getType. Is this situation expected or worth further investigation/fixing?


🔄 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/1097 **Author:** [@kamazee](https://github.com/kamazee) **Created:** 8/1/2014 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fetching_by_custom_type_property` --- ### 📝 Commits (1) - [`c731cbe`](https://github.com/doctrine/orm/commit/c731cbecd47675bcb47180b4092a17aeaf7b322e) Add failing test case for loading relation ### 📊 Changes **1 file changed** (+156 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3239Test.php` (+156 -0) </details> ### 📄 Description The test case below seems fairly simple, but I believe that it might uncover a bigger issue. Attached test fails: one record is expected, none records are returned. The problem looks rather simple: custom type is ignored and entity persister tries to load relation using PHP value, not a database one. It seems odd that [`getType` (and, hence, `expandParameters`)](https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php#L1731-1795) in BasicEntityPersister clearly expects field name but often gets different things. Just set a breakpoint there and watch values through the test suite. There might be not just field name, but a column with alias as well. This works (note variables at the bottom): ![screenshot from 2014-08-01 14 03 44](https://cloud.githubusercontent.com/assets/231518/3778796/c5cc3e66-1979-11e4-9279-5c322b7e8402.png) But this, apparently, doesn't: ![screenshot from 2014-08-01 14 07 29](https://cloud.githubusercontent.com/assets/231518/3778816/20da192c-197a-11e4-90b4-4c37ee454fb6.png) There are multiple places (more than one) that call `expandParameters` with criteria that can't be resolved with `getType`. Is this situation expected or worth further investigation/fixing? --- <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:25 +01:00
admin closed this issue 2026-01-22 16:03:25 +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#9150