Tuesday, February 24, 2009

Re: Core Models not loading at all

Checked file names, paths, everything. Heres the errors I get with
debug on:

Its for missing functions, meaning the model didnt load and instead
its the appmodel object.

$mostPlayed = ClassRegistry::init('TeamsGame')->getMostPlayedGames();
$newlyCreated = $this->Team->getRecentlyCreated();
$largestRosters = ClassRegistry::init('TeamsUser')->getLargestRosters
();

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 'getMostPlayedGames' at line 1 [CORE\cake\libs
\model\datasources\dbo_source.php, line 514]

Code | Context

$sql = "getMostPlayedGames"
$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 'getMostPlayedGames' at line 1"
$out = null

}

echo $_this->_output($level, $error, $code, $helpCode,
$description, $file, $line, $context);

Debugger::handleError() - CORE\cake\libs\debugger.php, line 221
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::getMostPlayedGames() - [internal], line ??
TeamsController::index() - APP\controllers\teams_controller.php, line
37
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 89

Query: getMostPlayedGames

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 'getLargestRosters' at line 1 [CORE\cake\libs
\model\datasources\dbo_source.php, line 514]

Code | Context

$sql = "getLargestRosters"
$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 'getLargestRosters' at line 1"
$out = null

}

echo $_this->_output($level, $error, $code, $helpCode,
$description, $file, $line, $context);

Debugger::handleError() - CORE\cake\libs\debugger.php, line 221
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::getLargestRosters() - [internal], line ??
TeamsController::index() - APP\controllers\teams_controller.php, line
39
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 89

Query: getLargestRosters

Warning (512): Model "GamesSystem" is not associated with model
"Game" [CORE\cake\libs\model\behaviors\containable.php, line 340]

Code | Context

$Model = AppModel
AppModel::$actsAs = array
AppModel::$useDbConfig = "default"
AppModel::$useTable = "games_systems"
AppModel::$displayField = "id"
AppModel::$id = false
AppModel::$data = array
AppModel::$table = "games_systems"
AppModel::$primaryKey = "id"
AppModel::$_schema = array
AppModel::$validate = array
AppModel::$validationErrors = array
AppModel::$tablePrefix = ""
AppModel::$name = "GamesSystem"
AppModel::$alias = "GamesSystem"
AppModel::$tableToModel = array
AppModel::$logTransactions = false
AppModel::$transactional = false
AppModel::$cacheQueries = false
AppModel::$belongsTo = array
AppModel::$hasOne = array
AppModel::$hasMany = array
AppModel::$hasAndBelongsToMany = array
AppModel::$Behaviors = BehaviorCollection object
AppModel::$whitelist = array
AppModel::$cacheSources = true
AppModel::$findQueryType = NULL
AppModel::$recursive = 1
AppModel::$order = NULL
AppModel::$__exists = NULL
AppModel::$__associationKeys = array
AppModel::$__associations = array
AppModel::$__backAssociation = array
AppModel::$__insertID = NULL
AppModel::$__numRows = NULL
AppModel::$__affectedRows = NULL
AppModel::$_findMethods = array
AppModel::$_log = NULL
$contain = array(
"Game"
)
$containments = array()
$throwErrors = true
$options = array(
"className",
"joinTable",
"with",
"foreignKey",
"associationForeignKey",
"conditions",
"fields",
"order",
"limit",
"offset",
"unique",
"finderQuery",
"deleteQuery",
"insertQuery"
)
$keep = array()
$depth = array()
$children = array()
$name = "Game"
$keys = array()

}

echo $_this->_output($level, $error, $code, $helpCode,
$description, $file, $line, $context);

Debugger::handleError() - CORE\cake\libs\debugger.php, line 221
ContainableBehavior::containments() - CORE\cake\libs\model\behaviors
\containable.php, line 340
ContainableBehavior::containments() - CORE\cake\libs\model\behaviors
\containable.php, line 345
ContainableBehavior::beforeFind() - CORE\cake\libs\model\behaviors
\containable.php, line 118
ModelBehavior::dispatchMethod() - CORE\cake\libs\model\behavior.php,
line 160
BehaviorCollection::trigger() - CORE\cake\libs\model\behavior.php,
line 440
Model::find() - CORE\cake\libs\model\model.php, line 1941
UsersGame::getMostPlayed() - APP\models\users_game.php, line 110
GamesController::index() - APP\controllers\games_controller.php, line
30
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 89

And this one, I have GamesSystem contained in the UsersGame model.
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: