DDC-2021: Array Data in Member OF #2547

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

Originally created by @doctrinebot on GitHub (Sep 9, 2012).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user vahid4134:

Hi.
First sorry for my bad english.
In
SELECT u.id FROM CmsUser u WHERE :groupId MEMBER OF u.groups
DQL we can't use Array of groupId like

Originally created by @doctrinebot on GitHub (Sep 9, 2012). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user vahid4134: Hi. First sorry for my bad english. In SELECT u.id FROM CmsUser u WHERE :groupId MEMBER OF u.groups DQL we can't use Array of groupId like
admin added the New Feature label 2026-01-22 13:56:23 +01:00
admin closed this issue 2026-01-22 13:56:23 +01:00
Author
Owner

@doctrinebot commented on GitHub (Sep 9, 2012):

@doctrinebot commented on GitHub (Sep 9, 2012): - is referenced by [DDC-3210: [GH-1080] possible fix for DDC-2021](http://www.doctrine-project.org/jira/browse/DDC-3210)
Author
Owner

@doctrinebot commented on GitHub (Jul 9, 2014):

Comment created by danielsippel:

+1

Simple solution could be this: use SQL IN(value) always instead of the equality sign..

Current situation:
500 Internal Server Error - DBALException
1 linked Exception: PDOException »

An exception occurred while executing 'SELECT w0*.id AS id0, w0_.userId AS userId1, w0_.profileName AS profileName2, w0_.url AS url3, w0_.companyName AS companyName4, w0_.firstName AS firstName5, w0_.lastName AS lastName6, w0_.street AS street7, w0_.houseNo AS houseNo8, w0_.postcode AS postcode9, w0_.city AS city10, w0_.phoneNo AS phoneNo11, w0_.faxNo AS faxNo12, w0_.email AS email13, w0_.websiteUrl AS websiteUrl14, w0_.description AS description15, w0_.created AS created16, w0_.updated AS updated17, w0_.offersFurther AS offersFurther18, w0_.companyLogoImageFileExtension AS companyLogoImageFileExtension19, w0_.location AS location20 FROM profile w0_ WHERE 1 = 1 AND (GLength(LineString(w0_.location, GeomFromText(?)))*100 < 30) AND EXISTS (SELECT 1 FROM profile_attribute_mapping p1_ INNER JOIN profile_attribute w2_ ON p1_.profileattribute_id = w2_.id WHERE p1_.profile_id = w0_.id AND w2*.id = ?, ?)' with params [{}, 1, 2]:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 2)' at line 1
@doctrinebot commented on GitHub (Jul 9, 2014): Comment created by danielsippel: +1 Simple solution could be this: use SQL IN(value) always instead of the equality sign.. Current situation: 500 Internal Server Error - DBALException 1 linked Exception: PDOException » ``` An exception occurred while executing 'SELECT w0*.id AS id0, w0_.userId AS userId1, w0_.profileName AS profileName2, w0_.url AS url3, w0_.companyName AS companyName4, w0_.firstName AS firstName5, w0_.lastName AS lastName6, w0_.street AS street7, w0_.houseNo AS houseNo8, w0_.postcode AS postcode9, w0_.city AS city10, w0_.phoneNo AS phoneNo11, w0_.faxNo AS faxNo12, w0_.email AS email13, w0_.websiteUrl AS websiteUrl14, w0_.description AS description15, w0_.created AS created16, w0_.updated AS updated17, w0_.offersFurther AS offersFurther18, w0_.companyLogoImageFileExtension AS companyLogoImageFileExtension19, w0_.location AS location20 FROM profile w0_ WHERE 1 = 1 AND (GLength(LineString(w0_.location, GeomFromText(?)))*100 < 30) AND EXISTS (SELECT 1 FROM profile_attribute_mapping p1_ INNER JOIN profile_attribute w2_ ON p1_.profileattribute_id = w2_.id WHERE p1_.profile_id = w0_.id AND w2*.id = ?, ?)' with params [{}, 1, 2]: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 2)' at line 1 ```
Author
Owner

@doctrinebot commented on GitHub (Jul 9, 2014):

Comment created by danielsippel:

pull request https://github.com/doctrine/doctrine2/pull/1080

Solution: use SQL IN(value) always instead of the equality sign

@doctrinebot commented on GitHub (Jul 9, 2014): Comment created by danielsippel: pull request https://github.com/doctrine/doctrine2/pull/1080 Solution: use SQL IN(value) always instead of the equality sign
Author
Owner

@doctrinebot commented on GitHub (Jul 11, 2014):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1080] was closed:
https://github.com/doctrine/doctrine2/pull/1080

@doctrinebot commented on GitHub (Jul 11, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1080] was closed: https://github.com/doctrine/doctrine2/pull/1080
Author
Owner

@doctrinebot commented on GitHub (Jul 11, 2014):

Comment created by @ocramius:

Handled in DDC-3210, see ae0ee72425

@doctrinebot commented on GitHub (Jul 11, 2014): Comment created by @ocramius: Handled in [DDC-3210](http://www.doctrine-project.org/jira/browse/DDC-3210), see https://github.com/doctrine/doctrine2/commit/ae0ee724252b8aaf41be9b397d3db3375767095d
Author
Owner

@doctrinebot commented on GitHub (Jul 11, 2014):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Jul 11, 2014): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2547