Doctrine PHPCR
  1. Doctrine PHPCR
  2. PHPCR-107

Support for ->sameNode type queries in QueryBuilder/ExpressionBuilder

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Labels:

      Description

      We should support sameNode operator of the QOMFactory in the QueryBuilder.

      An example using the PHPCR QB from the DoctrinePHPCRAdminBundle:

      Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
              $qb = $queryProxy->getQueryBuilder();
              $qmf = $qb->getQOMFactory();
      
              $constraint = null;
              foreach ($idx as $id) {
                  $path = $this->getBackendId($id);
                  $condition = $qmf->sameNode($path);
                  if ($constraint) {
                      $constraint = $qmf->orConstraint($constraint, $condition);
                  } else {
                      $constraint = $condition;
                  }
              }
              $qb->andWhere($constraint);
      

        Activity

        Show
        Daniel Leech added a comment - https://github.com/doctrine/phpcr-odm/pull/280

          People

          • Assignee:
            Lukas Kahwe
            Reporter:
            Daniel Leech
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: