Below is the codes that I have done. <?php class Product extends AppModel { var $name = 'Product'; var $belongsTo = array ('Dealer' => array( 'className' => 'Dealer', 'conditions' => '', 'order' => '', 'foreignKey' => 'dealer_id' ) ); } ?>
<?php class Dealer extends AppModel { var $name = 'Dealer'; var $hasMany = array ('Product' => array( 'className' => 'Product', 'conditions' => '', 'order' => '', 'foreignKey' => 'dealer_id' ) ); } ?> <?php class ProductsController extends AppController { var $scaffold; } ?> <?php class DealersController extends AppController { var $scaffold; } ?> The tables 'dealers' and 'products' exists. My problem is when I access 'http://localhost/cookup/dealers' and 'http://localhost/cookup/products', cake give me an error 'Error: Database table dealers for model Dealer was not found.' or 'Error: Database table products for model Product was not found.'. Furthermore, when I try to use bake, I cannot bake dealer and products. I have another table called 'users' and that table is fine. What is my problem? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---