i’ve already made that proces but still giving the same error and dont allow me to create a new model. i’ve changed my framework to fatfree framework just becouse of mongodb, but i dont want another framework. does anybody experienced on yiimongodbsuite, please help me, waiting please:S
I’m new and just tried MongoDBSuite. I’ve done everything suggested on the thread and believe the model generator on the latest stable version is dead. I’m not sure if it ever worked, but its dead now, or I’m doing something wrong.
I think the problem is in the init function of MongoModelCode.php. Notice how db is referenced instead of mongodb.
public function init()
throw new CHttpException(500,'An active "db" connection is required to run this generator.');
Searching google groups for gii will show what happens if mongodb is changed to db in the main.php file (where connection strings are stored). I would post the link, but no links in first post… In a nut shell, it complains about EMongoDB doesn’t have a tablePrefix property, which it doesn’t. EMongoDB doesn’t seem to exist in the project at all except in the main.php declaration.
Please let me know what I’m supposed to do to get this to work…
With the help of this gii extension you can migrate tables from a relational db (mysql …) to the mongoDB.
So you have two connection component in the config/main.php.
‘db’ for the connection to mysql, postgresql…
‘mongodb’ for the connection to the mongoDB
Don’t change these componentnames.
The codegenerator will read the fieldnames / types from the table you have specified and will generate a model and a controller with all views for CRUD operations for usage with the yiimongodbsuite (means the fields as public properties in the model, rules, actionCreate …).
I’ts a great tool to migrate existing tables from relational databases to the mongoDB and it works.
Following all of yours instruction, I am able to create model ,crud using mongoCRUD Generator and mongoModel Generator and able to insert a data using create action but when i try to go to admin its giving me following error.Is there any one who can help?
Fatal error: Call to a member function getDbCriteria() on a non-object in D:\xampp\htdocs\test_mongo\protected\extensions\YiiMongoDbSuite\EMongoDocumentDataProvider.php on line 73