Closed klickagent closed 8 years ago
I don't think this is such a good idea. It means that if we (or any end user) adds a new column to any of the tables, they will need to modify the plugin code. You should rather enable metadata caching in your database config. This gives the same speed-up as your code, but with none of the drawbacks of hard-coding the table schema.
Ok thats a point. But in my opinion it is bad practise to modify tables for a plugin as well. Thanks for the hint for metadata caching.
Closing.
That way Cakephp does not make db requests anymore to get the tableinfo before perfoming a query