CodeIgniter and Doctrine: Base table or view not found

VoildDiosse

New Member
I'm following the documentation almost word for word, except for two adjustments which I believe are corrections.First adjustment: I eliminate the redundant \[code\]DIRECTORY_SEPARATOR\[/code\] in \[code\]system/application/doctrine.php\[/code\]:\[code\]//this produces "...system/application//fixtures"$config = array('data_fixtures_path' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '/fixtures',//Replaced with:$config = array('data_fixtures_path' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fixtures',\[/code\]The resulting paths appear correct.Second adjustment: The generated models (e.g. \[code\]models/User.php\[/code\]) don't seem to load the base models that extend \[code\]Doctrine_Record\[/code\], so I add an explicit \[code\]require()\[/code\] call to each model like so:\[code\]require('generated/BaseUser.php');class User extends BaseUser { ... }\[/code\]So, my current problem: When it comes time to build the tables for the first time:\[code\]$ ./doctrine build-all-reloadbuild-all-reload - Are you sure you wish to drop your databases? (y/n)ybuild-all-reload - Successfully dropped database for connection named 'mydb'build-all-reload - Successfully created database for connection named 'mydb'build-all-reload - Created tables successfullySQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydb.user' doesn't exist\[/code\]Doctrine seems to happily empty tables, drop tables, drop databases, and create databases, but I can't figure out why it won't create tables. It clearly says \[code\]Created tables successfully\[/code\], but \[code\]SHOW TABLES;\[/code\] returns "No tables found in database."Doctrine is using the same MySQL user that I am, which has \[code\]ALL PRIVILEGES\[/code\].Any ideas why Doctrine can't create tables? Hopefully I'm just blind and/or dumb.Alternatively, is there I way I can just produce a file of SQL CREATE statements based on my yaml schema or models that I can run on my own to debug this issue?
 
Back
Top