|
Previous Page |
Solar_Example_Model_Areas |
Next Page |
fetchRelatedObject()
public
Solar_Sql_Model_Record|Solar_Sql_Model_Collection
fetchRelatedObject (
array|Solar_Sql_Model_Record $spec,
string $name,
int $page default NULL,
array $bind default NULL
)
Given a record, fetches a related record or collection for a named relationship.
Inherited from Solar_Sql_Model.
Parameters
- (array|Solar_Sql_Model_Record)
$spec: The specification for the native selection. If an array, treated as selection criteria; if a record object, uses the primary key from that record. - (string)
$name: The relationship name. - (int)
$page: For to-many associations, the page-number of records to fetch (default null, which fetches all records). Ignored by to-one associations. Paging is based on the related model's "$_paging" property. - (array)
$bind: Key-value pairs to bind to the select.
Returns
- (Solar_Sql_Model_Record|Solar_Sql_Model_Collection) A record or collection object.
Description
Given a record, fetches a related record or collection for a named relationship.
Local
- Overview
- Constants
- Properties
- Methods
- __call()
- __construct()
- __destruct()
- __get()
- _addFilter()
- _addRelated()
- _belongsTo()
- _createTableAndIndexes()
- _exception()
- _fetchAll()
- _fetchAssoc()
- _fixFilters()
- _fixIndex()
- _fixModelName()
- _fixOrder()
- _fixPropertyCols()
- _fixStack()
- _fixTableCols()
- _fixTableName()
- _hasMany()
- _hasOne()
- _setup()
- apiVersion()
- countPages()
- countPagesRelated()
- delete()
- dump()
- fetch()
- fetchAll()
- fetchAssoc()
- fetchCol()
- fetchNew()
- fetchOne()
- fetchPairs()
- fetchRelatedArray()
- fetchRelatedObject()
- fetchValue()
- fixSelectParams()
- getPaging()
- getRelated()
- insert()
- locale()
- newCollection()
- newRecord()
- newSelect()
- serializeCols()
- setPaging()
- unserializeCols()
- update()