[PHPCR-107] Support for ->sameNode type queries in QueryBuilder/ExpressionBuilder Created: 20/Apr/13  Updated: 25/Apr/13  Resolved: 25/Apr/13

Status: Resolved
Project: Doctrine PHPCR
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Daniel Leech Assignee: Lukas Kahwe
Resolution: Fixed Votes: 0
Labels: 1.0


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


 Comments   
Comment by Daniel Leech [ 25/Apr/13 ]

https://github.com/doctrine/phpcr-odm/pull/280

Generated at Mon Nov 24 21:55:26 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.