Implements the M-N (many to many) relationship via association table.
Consider the entity relationship between Articles and Categories via the association table <tt>Article_Category</tt>.
The static <tt>$RELATIONS</tt> property of ArticleRecord defines that the property <tt>$Categories</tt> has many <tt>CategoryRecord</tt>s. Similar, the static <tt>$RELATIONS</tt> property of CategoryRecord defines many ArticleRecords.
The articles with categories list may be fetched as follows.
Located in /Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php (line 85)
TActiveRecordRelation | --TActiveRecordHasManyAssociation
Get the foreign key index values from the results and make calls to the database to find the corresponding foreign objects using association table.
Fetches the foreign objects using TActiveRecord::findAllByIndex()
SQL inner join for M-N relationship via association table.
Updates the associated foreign objects.
Inherited From TActiveRecordRelation
TActiveRecordRelation::__construct()
TActiveRecordRelation::collectForeignObjects()
TActiveRecordRelation::fetchResultsInto()
TActiveRecordRelation::findForeignKeys()
TActiveRecordRelation::findForeignObjects()
TActiveRecordRelation::getContext()
TActiveRecordRelation::getCriteria()
TActiveRecordRelation::getIndexValues()
TActiveRecordRelation::getObjectHash()
TActiveRecordRelation::getRelationForeignKeys()
TActiveRecordRelation::getSourceRecord()
TActiveRecordRelation::populateResult()
TActiveRecordRelation::setObjectProperty()
TActiveRecordRelation::setResultCollection()
TActiveRecordRelation::__call()
Documentation generated on Mon, 25 Jun 2012 14:37:13 +0200 by phpDocumentor 1.4.3