Skip to content

Commit 4fa0382

Browse files
committed
Merge pull request #5 from alexptrn/master
add missing parameter $selectorName
2 parents d1fe117 + 801c4b5 commit 4fa0382

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tutorial/Tutorial.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ The QOM factory has a method to build a QOM query given four parameters, and [pr
370370

371371
The simplest case is to select all `[nt:unstructured]` nodes:
372372

373-
$source = $qomFactory->selector('[nt:unstructured]');
373+
$source = $qomFactory->selector('a', '[nt:unstructured]');
374374
$query = $qomFactory->createQuery($source, null, array(), array());
375375
$queryResult = $query->execute();
376376

@@ -388,13 +388,13 @@ An example of query built with QueryBuilder:
388388
$qf = $qomFactory;
389389
$qb = new QueryBuilder($qomFactory);
390390
//add the source
391-
$qb->from($qomFactory->selector('nt:unstructured'))
391+
$qb->from($qomFactory->selector('a', 'nt:unstructured'))
392392
//some composed constraint
393-
->andWhere($qf->comparison($qf->propertyValue('title'),
393+
->andWhere($qf->comparison($qf->propertyValue('a', 'title'),
394394
QueryObjectModelConstantsInterface::JCR_OPERATOR_EQUAL_TO,
395395
$qf->literal('Test')))
396396
//orderings (descending by default)
397-
->orderBy($qf->propertyValue('content'))
397+
->orderBy($qf->propertyValue('a', 'content'))
398398
//set an offset
399399
->setFirstResult(0)
400400
//and the maximum number of node-tuples to retrieve

0 commit comments

Comments
 (0)