Worm64 Posted June 8, 2015 Report Share Posted June 8, 2015 SalutAm si eu o problema cu yii framework,am creat un tabel am generat modelul,am adaugat 4 coloane noi in tabel,dar nu le vad in model,daca apelez $model->coloana zice ca coloana nu e definita.In model am foarte multe functii custom nu pot sa il regenerez,nici sa folosesc diff.Cum pot sa adaug manual coloana in model,am adaugat numele coloanei in AttributesLabels() si rules() dar eroarea persista. Quote Link to comment Share on other sites More sharing options...
tlb Posted June 8, 2015 Report Share Posted June 8, 2015 Verifica daca ai returnat corect variabila din model catre controller. Quote Link to comment Share on other sites More sharing options...
Worm64 Posted June 8, 2015 Author Report Share Posted June 8, 2015 Daca dau var_dump() laLocation::model()->findByAttributes(array( 'country_id' => 1));Imi returneaza toate coloanele vechi,cele 4 noi nu le vad. Quote Link to comment Share on other sites More sharing options...
tlb Posted June 8, 2015 Report Share Posted June 8, 2015 Atunci verifica sa n-ai vreun typo prin SELECT Quote Link to comment Share on other sites More sharing options...
sclipici Posted June 8, 2015 Report Share Posted June 8, 2015 Dupa ce ai adaugat la :public function attributeLabels(){ return array( 'sloboz' => 'SLoboz', ... );}Vezi in top sa ai:* @property integer $slobozIn view$this->widgeLA attributes adaugi sloboz in array Quote Link to comment Share on other sites More sharing options...
Worm64 Posted June 8, 2015 Author Report Share Posted June 8, 2015 @sclipici:Am verificat totul pare ok,dar problema persista.Nu am avut alta solutie decat sa regenerez modelul si sa rescriu totul. Quote Link to comment Share on other sites More sharing options...