Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Incorrect doc - Do not call execute() #13

Merged
merged 1 commit into from

2 participants

@inspiran

The doc is incorrect because calling ->execute() results into a QueryResult object. This causes $qb->getQuery() failing to work because it's expecting a query builder instance

@inspiran inspiran Do not call execute()
The doc is incorrect because calling ->execute() results into a QueryResult object.  This causes $qb->getQuery() failing to work because it's expecting a query builder instance
0803c41
@lsmith77 lsmith77 merged commit b1fac25 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 5, 2013
  1. @inspiran

    Do not call execute()

    inspiran authored
    The doc is incorrect because calling ->execute() results into a QueryResult object.  This causes $qb->getQuery() failing to work because it's expecting a query builder instance
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 3 deletions.
  1. +2 −3 en/reference/query-builder.rst
View
5 en/reference/query-builder.rst
@@ -44,8 +44,7 @@ This query is equivalent to the JCR-SQL2 query ``SELECT * FROM nt:unstructured W
/** @var $qb QueryBuilder */
$factory = $qb->getQOMFactory();
$qb->from($factory->selector('nt:unstructured'))
- ->where($factory->propertyExistence('name'))
- ->execute();
+ ->where($factory->propertyExistence('name'));
$result = $documentManager->getDocumentsByQuery($qb->getQuery());
foreach ($result as $document) {
@@ -90,4 +89,4 @@ If you want to know the SQL2 statement generated call getStatement() on the quer
<?php
//Prepare the query builder with the desired statement.
//..
- echo $qb->getQuery()->getStatement();
+ echo $qb->getQuery()->getStatement();
Something went wrong with that request. Please try again.