Hi. I'm just starting to look to Phalcons ORM, so this may sound a weird remark, but please bear with me.
I want to use a table prefix, transparent to the developer. I know Phalcon does not have this feature, so i was looking for workarounds. I found the two indicated in this forum - using a superclass or a trait. Neither works very well for me, as it takes the class name too literaly and i'll be working with different developers with different coding standards and ways of naming data base tables. So...
I implemented a class extending Mvc\Model\Manager and rewrote the setModelSource method to include the table prefix. This method is used when the model class invokes setSource - which makes sense. But when the model class rewrites getSource method, then it is 'final' - no way to control from the manager class - and its result is used everywhere.
I thought about trying to change the base class, but I don't think that's right. My question is, wouldn't table prefix be really easy to implement if only the getSource method didn't exist and the model classes had to use setSource method()? Isn't this method just a shortcut? Am i missing something?
Thanks in advance :)