Hello,
I’m new to both Yii and Mongodb but I’m pretty sure that I have everything setup correctly on my machine. I have both MySQL (via MAMP) and MongoDB running on localhost. I can use the normal Gii methods and generate code but for some reason the MongoModel Generator does not want to work. I have pointed it at an existing table in MySQL, filled out the table name, Model Class, and Mongo Collection Name, but when I click on the Preview button I get the following error:
[color="#FF0000"]Class ‘EMongoDocument’ does not exist or has syntax error.[/color]
I have the following defined in main.php:
'import' => array(
// ...
'ext.YiiMongoDbSuite.*',
),
'components' => array(
// ...
'mongodb' => array(
'class' => 'EMongoDB',
'connectionString' => 'mongodb://localhost',
'dbName' => 'test',
'fsyncFlag' => false,
'safeFlag' => false,
'useCursor' => false,
),
// ...
),
I have verified that EMongoDocument is indeed located at protected/extensions/YiiMongoDbSuite/EMongoDocument.php. What am I doing wrong? Please help!
Thanks in advance,
Tommy