Class TActiveRecordRelation
Base class for active record relationships.
Direct known subclasses
TActiveRecordBelongsTo, TActiveRecordHasMany, TActiveRecordHasManyAssociation, TActiveRecordHasOnePackage: System\Data\ActiveRecord\Relations
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Wei Zhuo <weizho[at]gmail[dot]com>
Version: $Id$
Since: 3.1
Located at Data/ActiveRecord/Relations/TActiveRecordRelation.php
public
|
|
protected
|
|
protected
|
|
protected
|
|
abstract protected
|
|
public
mixed
|
#
__call( string $method, array $args )
Dispatch the method calls to the source record finder object. When an instance of TActiveRecord or an array of TActiveRecord is returned the corresponding foreign objects are also fetched and assigned. |
public
boolean
|
|
protected
array
|
#
findForeignKeys(
Returns foreign keys in $fromRecord with source column names as key and foreign column names in the corresponding $matchesRecord as value. The method returns the first matching foreign key between these 2 records. |
abstract public
array
|
|
protected
string
|
|
protected
|
#
findForeignObjects( array $fields, array $indexValues )
Fetches the foreign objects using TActiveRecord::findAllByIndex() |
protected
array
|
#
getIndexValues( array $keys, array $results )
Obtain the foreign key index values from the results. |
protected
|
#
populateResult( array & $results, array $properties, array & $fkObjects, array $fields )
Populate the results with the foreign objects found. |
protected
|
#
setResultCollection( array & $results, array & $collections, array $properties )
Populates the result array with foreign objects (matched using foreign key hashed property values). |
protected
|
#
setObjectProperty(
Sets the foreign objects to the given property on the source object. |