2
votes

I want to extend the Doctrine_core::getTable('table_name')->find('id') to increment the table_name.view_count field each time it is executed. Is this possible?

1
Edit the TableNameTable.class.php file, add a find method that increments the view count, and have it call its parent's find method? - Dan Grossman
`return parent::find($id) does not work for some reason. - whamsicore
What exactly does "does not work" mean? - greg0ire
It doesn't retrieve any objects. - whamsicore
What SQL query do you see in the sql tab of the symfony debug toolbar? - greg0ire

1 Answers

0
votes

I think it's not a good practice to put a such functionality into model.