Firstly, the $name must be == to the name of the Model. $name is used to compatibility in php4
Secondly, The WorksCollections controller is looking for the WorksCollection model. Cakephp only singularises the last word in a multi word name. So you should rename your WorkCollection model to WorksCollection. Thirdly, your table name has the prefix cc_ so your are going to need to set that either in the database configuration (if shared by all your tables), or in the model (See api.cakephp.org) On Aug 9, 11:01 pm, JuanWalker <juanwal...@gmail.com> wrote: > Hi Guys, I've this problem. I've a table called cc_works_collections > that I've created on mysql db. > > These are the controller and the model of this table (Using scaffold) > > class WorksCollectionsController extends AppController { > > var $name = 'WorksCollections'; > var $scaffold; > > } > > class WorkCollection extends AppModel{ > > var $name ="CcWorkCollection"; > var $belongsTo ="MdlAssignament"; > var $hasOne = "MdlAssignamentSubmission"; > > } > > When I try to test my scaffold it ask for works_collections table but > I've specified that my table has been named cc_works_collections as > you see on model source. > > This error is appearing : > > Missing Database Table > > Error: Database table works_collections for model WorksCollection was > not found. > > I've deleted cache from model and nothing changes, what's going on? > Please help me!! Many thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---