TActiveRecordException

Description

Unable to find foreign key relationships in table '`join_institution_art_school_to_art_school_specialization`' that corresponds to table '`institution_art_school`'.

Source File

/home/clients/mapatest/mapatest/www/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php (135)

0124:             if($fkTable===$matchingTableName || $fkTable===$matchingFullTableName)
0125:             {
0126:                 $hasFkField = !$loose && $this->getContext()->hasFkField();
0127:                 $key = $hasFkField ? $this->getFkFields($fkeys['keys']) : $fkeys['keys'];
0128:                 if(!empty($key))
0129:                     return $key;
0130:             }
0131:         }
0132: 
0133:         //none found
0134:         $matching = $gateway->getRecordTableInfo($matchesRecord)->getTableFullName();
0135: throw new TActiveRecordException('ar_relations_missing_fk',
0136: $tableInfo->getTableFullName(), $matching); 0137: } 0138: 0139: /** 0140: * @return array foreign key field names as key and object properties as value. 0141: * @since 3.1.2 0142: */ 0143: abstract public function getRelationForeignKeys(); 0144: 0145: /** 0146: * Find matching foreign key fields from the 3rd element of an entry in TActiveRecord::$RELATION. 0147: * Assume field names consist of [\w-] character sets. Prefix to the field names ending with a dot

Stack Trace

#0 /home/clients/mapatest/mapatest/www/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php(111): TActiveRecordRelation->findForeignKeys(Object(TMysqlTableInfo), Object(InstitutionArtSchoolRecord), true)
#1 /home/clients/mapatest/mapatest/www/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php(99): TActiveRecordHasManyAssociation->getRelationForeignKeys()
#2 /home/clients/mapatest/mapatest/www/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php(82): TActiveRecordHasManyAssociation->collectForeignObjects(Object(InstitutionArtSchoolRecord))
#3 /home/clients/mapatest/mapatest/www/protected/pages/InstitutionCard.php(95): TActiveRecordRelation->__call('findByPk', Array)
#4 /home/clients/mapatest/mapatest/www/protected/pages/InstitutionCard.php(95): TActiveRecordHasManyAssociation->findByPk('208')
#5 /home/clients/mapatest/mapatest/www/framework/pradolite.php(4210): InstitutionCard->onLoad(NULL)
#6 /home/clients/mapatest/mapatest/www/framework/pradolite.php(6223): TControl->loadRecursive()
#7 /home/clients/mapatest/mapatest/www/framework/pradolite.php(6215): TPage->processNormalRequest(Object(THtmlWriter))
#8 /home/clients/mapatest/mapatest/www/framework/pradolite.php(8340): TPage->run(Object(THtmlWriter))
#9 /home/clients/mapatest/mapatest/www/framework/pradolite.php(8306): TPageService->runPage(Object(InstitutionCard), Array)
#10 /home/clients/mapatest/mapatest/www/framework/pradolite.php(9297): TPageService->run()
#11 /home/clients/mapatest/mapatest/www/framework/pradolite.php(8899): TApplication->runService()
#12 /home/clients/mapatest/mapatest/www/index.php(25): TApplication->run()
#13 {main}
2024-06-19 05:32 Apache PRADO/3.1.10