Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-798

Clarify param term in MEMBER OF example in DQL docs

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA4
    • Fix Version/s: 2.0-RC1
    • Component/s: Documentation
    • Security Level: All
    • Labels:
      None

      Description

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

        Activity

        Hide
        Roman S. Borschel added a comment -

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

        Show
        Roman S. Borschel added a comment - Its supposed to be an object, not an id, although an id might work too, I dont know.
        Hide
        Marc Hodgins added a comment -

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

        Show
        Marc Hodgins added a comment - Ok. Well, a clarification of whatever is permitted there would improve the docs. An id does seem to work.
        Hide
        Benjamin Eberlei added a comment -

        Fixed

        Show
        Benjamin Eberlei added a comment - Fixed

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Marc Hodgins
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: