Yii autoloading subobjects with relations. I like to block autoload subobjects on object. Performance issue on multiple objects.
public function relations() {
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'testReportConfig' => array(self::HAS_ONE, 'TestReportConfig', 'id_test'),
'candColSettings' => array(self::HAS_MANY, 'CandColSettings', 'id_test_fk'),
'storProducts' => array(self::HAS_MANY, 'StorProducts', 'id_test'),
'storePointGeneralPrices' => array(self::HAS_MANY, 'StorePointGeneralPrice', 'id_test_fk'),
'testAnswers' => array(self::HAS_MANY, 'TestAnswer', 'id_test'),
'testTestsGroups' => array(self::HAS_ONE, 'TestTestsGroups', 'id_test'),
'recrApplications' => array(self::MANY_MANY, 'RecrApplication', 'test_assessets(id_test, id_application_pk)'),
'testManagements' => array(self::HAS_MANY, 'TestManagement', 'id_test'),
'testManagementTests' => array(self::HAS_MANY, 'TestManagementTests', 'id_test'),
'testQuestions' => array(self::HAS_MANY, 'TestQuestions', 'id_test'),
'testReportConfig' => array(self::HAS_ONE, 'TestReportConfig', 'id_test'),
'testReportCompetences' => array(self::HAS_MANY, 'TestReportCompetences', 'id_test'),
'idOwner' => array(self::BELONGS_TO, 'CoreUsers', 'id_owner'),
'idType' => array(self::BELONGS_TO, 'TestTestsType', 'id_type'),
'idPosition' => array(self::BELONGS_TO, 'ToolPosition', 'id_position'),
'toolCompetenciesTrees' => array(self::MANY_MANY, 'ToolCompetenciesTree', 'test_tests_competencies(id_test, id_competence)'),
'toolCompetencyModels' => array(self::MANY_MANY, 'ToolCompetencyModel', 'tool_competency_model_tools(id_test, id_competency_model)'),
'toolSimpleModels' => array(self::HAS_MANY, 'ToolSimpleModel', 'id_test'),
'testStandards' => array(self::HAS_MANY, 'TestStandards', 'id_test'),
'vDetailedIndicators' => array(self::HAS_MANY, 'VDetailedIndicators', 'id_test'),
'vGeneralIndicators' => array(self::HAS_MANY, 'VGeneralIndicators', 'id_test'),
);
}
I need stop autoload not when declaring relations, but when i create a parent object. How to do it?