Prado\Data\ActiveRecord\Relations\TActiveRecordHasMany::collectForeignObjects PHP Метод

collectForeignObjects() защищенный Метод

Get the foreign key index values from the results and make calls to the database to find the corresponding foreign objects.
protected collectForeignObjects ( &$results )
    protected function collectForeignObjects(&$results)
    {
        $fkeys = $this->getRelationForeignKeys();
        $properties = array_values($fkeys);
        $fields = array_keys($fkeys);
        $indexValues = $this->getIndexValues($properties, $results);
        $fkObjects = $this->findForeignObjects($fields, $indexValues);
        $this->populateResult($results, $properties, $fkObjects, $fields);
    }