mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[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
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/1097
Author: @kamazee
Created: 8/1/2014
Status: ❌ Closed
Base:
master← Head:fetching_by_custom_type_property📝 Commits (1)
c731cbeAdd 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):

But this, apparently, doesn't:

There are multiple places (more than one) that call
expandParameterswith criteria that can't be resolved withgetType. 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.