uafrica / oauth-server

OAuth Server
Other
51 stars 51 forks source link

Added schema array configuration to the tables #21

Closed klickagent closed 8 years ago

klickagent commented 9 years ago

That way Cakephp does not make db requests anymore to get the tableinfo before perfoming a query

dakota commented 9 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.

klickagent commented 9 years ago

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.

dakota commented 8 years ago

Closing.