This is still making no sense. Heres my controllers (hid $uses below)
and models.
<?php
// controllers/blog_controller.php
class BlogController extends AppController {
function test() {
$this->EntriesTopic->test();
exit();
}
}
// models/entries_topic.php
class EntriesTopic extends AppModel {
var $belongsTo = array('Topic', 'Entry');
function test() {
echo 'test';
debug($this->find('all', array('recursive' => 2)));
}
} ?>
When I go to /blog/test/ I get the following errors. The damn model is
not even being initialized, you can see it call AppModel instead of
EntriesTopic, what am I missing here......
Warning (512): SQL Error: 1064: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'test' at line 1 [CORE\cake\libs\model
\datasources\dbo_source.php, line 514]
DboSource::showQuery() - CORE\cake\libs\model\datasources
\dbo_source.php, line 514
DboSource::execute() - CORE\cake\libs\model\datasources
\dbo_source.php, line 201
DboSource::fetchAll() - CORE\cake\libs\model\datasources
\dbo_source.php, line 337
DboSource::query() - CORE\cake\libs\model\datasources\dbo_source.php,
line 298
Model::call__() - CORE\cake\libs\model\model.php, line 436
Overloadable::__call() - CORE\cake\libs\overloadable_php5.php, line 52
AppModel::test() - [internal], line ??
BlogController::test() - APP\controllers\blog_controller.php, line 52
Object::dispatchMethod() - CORE\cake\libs\object.php, line 115
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 245
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 211
[main] - APP\webroot\index.php, line 88
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---