[PR #83] fixes DDC-1150 #7695

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

Original Pull Request: https://github.com/doctrine/orm/pull/83

State: closed
Merged: No


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).

**Original Pull Request:** https://github.com/doctrine/orm/pull/83 **State:** closed **Merged:** No --- 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).
admin added the pull-request label 2026-01-22 15:56:23 +01:00
admin closed this issue 2026-01-22 15:56:24 +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#7695