[PR #83] [CLOSED] fixes DDC-1150 #7690

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

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/83
Author: @ghost
Created: 7/11/2011
Status: Closed

Base: masterHead: DDC-1150


📝 Commits (1)

📊 Changes

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

View changed files

📝 lib/Doctrine/ORM/Persisters/BasicEntityPersister.php (+4 -0)
📝 tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php (+24 -0)

📄 Description

Hey guys,

I got annoyed by this bug until I found it already had an issue. It is a bug when using an array as value for a association field in a find*By() method.

As @beberlei pointed out, we could just assume that the value is a PDO::PARAM_STR.

Searching through the ORM Tools, I found that SchemaTool checks the type of an association field (if string or decimal) even if I can't specify a column type to a property that is an association (maybe just hacking like in SchemaToolTest - not sure, am I correct?).

That it's. Maybe not the best thing from the database POV but at least make the API more consistent (like setParameter with an array value parameter).


🔄 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/83 **Author:** [@ghost](https://github.com/ghost) **Created:** 7/11/2011 **Status:** ❌ Closed **Base:** `master` ← **Head:** `DDC-1150` --- ### 📝 Commits (1) - [`27c9b73`](https://github.com/doctrine/orm/commit/27c9b7393dbfd4748756de812be3d07aa98c1434) fixes DDC-1150 ### 📊 Changes **2 files changed** (+28 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Persisters/BasicEntityPersister.php` (+4 -0) 📝 `tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.php` (+24 -0) </details> ### 📄 Description Hey guys, I got annoyed by this bug until I found it already had an issue. It is a bug when using an array as value for a association field in a `find*By()` method. As @beberlei [pointed out](http://www.doctrine-project.org/jira/browse/DDC-1150?focusedCommentId=15984&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_15984), we could just assume that the value is a `PDO::PARAM_STR`. Searching through the ORM Tools, I found that [`SchemaTool`](https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/SchemaTool.php#L512) checks the type of an association field (if `string` or `decimal`) even if I can't specify a column type to a property that is an association (maybe just hacking like in [`SchemaToolTest`](https://github.com/doctrine/doctrine2/blob/master/tests/Doctrine/Tests/ORM/Tools/SchemaToolTest.php#L40) - not sure, am I correct?). That it's. Maybe not the best thing from the database POV but at least make the API more consistent (like `setParameter` with an array value parameter). --- <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:22 +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#7690