DDC-798: Clarify param term in MEMBER OF example in DQL docs #981

Closed
opened 2026-01-22 12:58:02 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 10, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user mjh_ca:

Current code example reads:

$query = $em->createQuery('SELECT u.id FROM CmsUser u WHERE :param MEMBER OF u.groups');
$ids = $query->getResult();

Maybe it's just me, but it was not immediately apparent that *:param* is expected to be an identifier value from the CmsGroups entity (group ID number). It may improve the example to rename :param to :groupId or add $query->setParameter(':param', $groupId);

Originally created by @doctrinebot on GitHub (Sep 10, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user mjh_ca: Current code example reads: ``` $query = $em->createQuery('SELECT u.id FROM CmsUser u WHERE :param MEMBER OF u.groups'); $ids = $query->getResult(); ``` Maybe it's just me, but it was not immediately apparent that **:param\* is expected to be an identifier value from the CmsGroups entity (group ID number). It may improve the example to rename _:param_ to *:groupId** or add $query->setParameter(':param', $groupId);
admin added the Improvement label 2026-01-22 12:58:02 +01:00
admin closed this issue 2026-01-22 12:58:04 +01:00
Author
Owner

@doctrinebot commented on GitHub (Sep 10, 2010):

Comment created by romanb:

Its supposed to be an object, not an id, although an id might work too, I dont know.

@doctrinebot commented on GitHub (Sep 10, 2010): Comment created by romanb: Its supposed to be an object, not an id, although an id might work too, I dont know.
Author
Owner

@doctrinebot commented on GitHub (Sep 10, 2010):

Comment created by mjh_ca:

Ok. Well, a clarification of whatever is permitted there would improve the docs. An id does seem to work.

@doctrinebot commented on GitHub (Sep 10, 2010): Comment created by mjh_ca: Ok. Well, a clarification of whatever is permitted there would improve the docs. An id does seem to work.
Author
Owner

@doctrinebot commented on GitHub (Sep 30, 2010):

Comment created by @beberlei:

Fixed

@doctrinebot commented on GitHub (Sep 30, 2010): Comment created by @beberlei: Fixed
Author
Owner

@doctrinebot commented on GitHub (Sep 30, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Sep 30, 2010): 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#981