Apache Zeta Components Manual :: Docs For Class ezcPersistentFindWithRelationsQuery
PersistentObject::ezcPersistentFindWithRelationsQuery
Class ezcPersistentFindWithRelationsQuery
Find query object for pre-fetching queries in ezcPersistentSessionIdentityDecorator.
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.
Source for this file: /PersistentObject/src/queries/find_with_relations_query.php
ezcPersistentFindQuery | --ezcPersistentFindWithRelationsQuery
Version: | //autogen// |
Properties
bool | read |
$isRestricted
Whether the query has been restricted using a where() condition. |
Inherited Member Variables
From ezcPersistentFindQuery | |
---|---|
protected |
ezcPersistentFindQuery::$properties
|
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 | |
---|---|
public ezcPersistentFindQuery |
ezcPersistentFindQuery::__construct()
Creates a new persistent find query. |
public mixed |
ezcPersistentFindQuery::__call()
Delegate to inner $query object. |
Methods
__construct
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) |
Redefinition of:
Method | Description |
---|---|
ezcPersistentFindQuery::__construct() |
Creates a new persistent find query. |
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:
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. |
Exceptions:
Type | Description |
---|---|
ezcQueryVariableParameterException |
if called with no parameters. |
__call
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 |
Exceptions:
Type | Description |
---|---|
RuntimeException |
For any call. |
Redefinition of:
Method | Description |
---|---|
ezcPersistentFindQuery::__call() |
Delegate to inner $query object. |