hello ,
what can be wrong in the folowing code :
code in table1 controller :
public function updateManyMany() {
if ($this->isNewRecord) {
//..create records on table1_2 ...
} else {
//..update records on table1_2 ...
}
return true;
}
public function afterSave() {
$this->updateManyMany();
return parent::afterSave();
}
I try to overide the afterSave() on my table1 controller with a function -updateMany()- that is declared just "above" it and I get the error that this function is not part of the controller :-/
I don't see what's going on ..
if someone has a clue ?
thanks
Rico
Page 1 of 1
table1 does not have a method named "updateManyMany" when called by "afterSave()"
#2
Posted 20 October 2009 - 06:49 AM
...
I try to overide the afterSave() on my table1 controller with a function -updateMany()- that is declared just "above" it and I get the error that this function is not part of the controller :-/
...
[/quote]
That's because afterSave is a method of CActiveRecord.
/Tommy
I try to overide the afterSave() on my table1 controller with a function -updateMany()- that is declared just "above" it and I get the error that this function is not part of the controller :-/
...
[/quote]
That's because afterSave is a method of CActiveRecord.
/Tommy
#3
Posted 20 October 2009 - 08:22 AM
[quote name='tri' date='20 October 2009 - 12:49 PM' timestamp='1256039373' post='26588']
...
I try to overide the afterSave() on my table1 controller with a function -updateMany()- that is declared just "above" it and I get the error that this function is not part of the controller :-/
...
[/quote]
That's because afterSave is a method of CActiveRecord.
/Tommy
[/quote]
thanks Tommy,
your're right ...
works much better
cheers !
...
I try to overide the afterSave() on my table1 controller with a function -updateMany()- that is declared just "above" it and I get the error that this function is not part of the controller :-/
...
[/quote]
That's because afterSave is a method of CActiveRecord.
/Tommy
[/quote]
thanks Tommy,
your're right ...
works much better
cheers !
Share this topic:
Page 1 of 1

Help












