PersistentObject: ezcPersistentFindWithRelationsQuery
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcPersistentFindWithRelationsQuery
|
Find query object for pre-fetching queries in ezcPersistentSessionIdentityDecorator. [
source]
This query class extends
ezcPersistentFindQuery with the possibility to define related objects to be pre-fretched. Do not instantiate this class directly, but use ezcPersistentIdentityDecorator::createFindQueryWithRelations() instead.
Parents
ezcPersistentFindQuery
|
--ezcPersistentFindWithRelationsQuery
Properties
Inherited Member Variables
From
ezcPersistentFindQuery:
Method Summary
|
public ezcPersistentFindWithRelationsQuery |
__construct(
$query, $className, $relations )
Creates a new persistent find query. |
|
public ezcQuerySelect |
where(
$... )
Adds a where clause with logical expressions to the query. |
|
public mixed |
__call(
$methodName, $arguments )
Delegate to inner $query object. |
Inherited Methods
From
ezcPersistentFindQuery :
Methods
__construct
ezcPersistentFindWithRelationsQuery __construct(
$query, string
$className,
$relations )
Creates a new persistent find query.
Creates a new persistent find query from the query object $q and the given $className. $relations defines, which related objects should be fetched by this query.
Parameters
| Name |
Type |
Description |
$query |
ezcQuerySelect |
|
$className |
string |
|
$relations |
array(string=>ezcPersistentRelationFindDefinition) |
|
See also:
ezcPerisistentSessionIdenityDecorator::createFindWithRelationsQuery().
Redefinition of
where
Adds a where clause with logical expressions to the query.
where() accepts an arbitrary number of parameters. Each parameter must contain a logical expression or an array with logical expressions. If you specify multiple logical expression they are connected using a logical and.
Multiple calls to where() will join the expressions using a logical and.
Example:
1. $q->select( '*' )->from( 'table' )->where( $q->expr->eq( 'id', 1 ) );
Note, if you add a WHERE clause to this query, the fetched related objects will not be fetched into the
ezcPersistentIdentityMap used as a typical related object set, but as a named set.
Parameters
| Name |
Type |
Description |
$... |
string|array(string) |
Either a string with a logical expression name or an array with logical expressions. |
Throws
| Class | Description |
ezcQueryVariableParameterException |
if called with no parameters. |
__call
mixed __call(
string
$methodName, array
$arguments )
Delegate to inner $query object.
This query object does not allow any other calls than {where()} and {groupBy()}. Therefore, this method throws an exception, for any other call.
Parameters
| Name |
Type |
Description |
$methodName |
string |
|
$arguments |
array |
|
Throws
| Class | Description |
RuntimeException |
For any call. |
Redefinition of
Last updated: Tue, 23 Mar 2010