Maybe you should re-think how your application works. If not all tables are required, there should be some way to set that application-specific. Maybe put something in bootstrap?
On Sat, Aug 8, 2009 at 3:09 PM, Abhimanyu Grover<[email protected]> wrote: > > Right now, If a table for a specific model is not found, CakePHP > execution stops with big "Missing database table" error - however > sometimes you may run into scenario where you need not following code > to run.. We ran into a similar scenario in a project which has like 30 > models, out of which some are not always required on different client > setups. The problem occurred when we made a shell script which > performs some stuff on every model of system. So, whenever it tries to > load a model, say: > > foreach($models as $modelName) { > $model = ClassRegistry::init($modelName); > } > > So when a model whose db table doesn't exists, is being loaded - it > exits saying "Missing database table...." and doesnt go beyond. I went > a step ahead a tried overwriting Object::_stop() but that'll just > produce more warnings, and it just didnt worked. > > Anyone faced this issue before? or Any ideas on getting ahead of the > problem? > > Thanks guys. > Abhimanyu > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
