Permalink
Browse files

Added descendant() doc

  • Loading branch information...
1 parent c71d796 commit 6b85a3ee54690391797d9a4af7d66060fafabafb @dantleech dantleech committed Jan 15, 2013
Showing with 16 additions and 1 deletion.
  1. +16 −1 en/reference/query-builder.rst
@@ -57,7 +57,9 @@ will automatically select only those records which are associated with the ``Doc
$posts = $qb->getQuery()->execute();
The above code block will select all documents in the document tree of class ``Post``. This
-feature is especially usefull within a document repository class.
+feature is especially useful within a document repository class.
+
+Example showing the use of the query builder in a ``DocumentRepository``:
.. code-block:: php
@@ -354,6 +356,19 @@ than or equal to the given value.
$qb->expr()->lte('number_of_logins', 50);
+.. _qbref_expr_descendant:
+
+descendant
+~~~~~~~~~~
+
+Specify that candidate documents must be descendants of the node at the given path.
+
+.. code-block:: php
+
+ <?php
+
+ $qb->expr()->descendant('/path/to/parent');
+
.. _qbref_phpcrquerybuilder:
The PHPCR QueryBuilder

0 comments on commit 6b85a3e

Please sign in to comment.