Hi all,
as far as I know there is no link between a controller and a model.
In a situation where I have a BaseController for all controllers it can be handy to refer to a so called linked Model (default Model of a controller so to say) so that I can have one method in the BaseController to perform the same operation for the controller's model.
for instance I have a actionDuplicate in the BaseController which is in charge of calling a generic model duplicate method to hum … duplicate a record
I had to declare a model variable for all controllers (in BaseController) and assign the 'ucfirsted' controller->id like this in an init method (overriden from CController)
this suits me fine but as there is no such link (between Controller and Model) by design I was wondering if my approach had hidden falws that I cannot see
or if someone would have another approach
thanks in advance
hope this is of interest to someone