The way I name my controllers and models are {{ComponentName}}Controller{{ControllerName}} and {{ComponentName}}Model{{ModelName}} so something like FruitStoreControllerApples and FruitStoreModelApples.
What I've noticed is using getName() in the model returns Apples and getname() in the controller returns FruitStore, this means every controller returns FruitStore instead of the intended controller name.
here's the 2 lines in question
Controller:
Model:
I believe it's a simple regex fix
Labels |
Added:
?
|
Labels |
Added:
?
|
Labels |
Removed:
?
|
Status | New | ⇒ | Expected Behaviour |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-01-09 13:23:53 |
Closed_By | ⇒ | richard67 |
Closing as expected behaviour.
Thanks for the clarification, I've since used the model name for my needs.
Although the method is getName(), it is actually used to return name of the component. If you fix it, everything will be broken. See some of it usages and you will understand:
....
So better leave it as how it is for now.