Hiya, could someone tell me how to use those automatic set functions?
I have a column called “deleted”. When a user clicks a link, it goes to a delete action. The delete action previously deleted a row in the db. Now I just want it to set the deleted field value of that row to 1. Symfony has created a function called setDelete(), but I don’t know how to use it. I am trying this:
$consultant = Doctrine_Core::getTable('consultant')->find(array($request->getParameter('id')));
$consultant->setDeleted('1');
I’m not getting any errors, but it’s still not updating the table.
you will have to execute
$consultant->save();after the set.By the way, since symfony 1.4.3 you can call
ConsultantTable::getInstance()instead ofDoctrine_Core::getTable('consultant')which allows your IDE to autocomplete the methods in the model.