The reasons to release this extensions is to share it with the community and get feedback from you all. May be you can also help me to test this component.
Yes, it’s right. By default the criteria that passed to find() and findAll() method is using the same criteria that used on PHP mongo db driver. I think it’s better to implement the default and we can write findByPk method to pass _id without create new instance of MongoId object first.
Thanks, i just saw the library and it’s bring some of great features to implement on this extension. Thanks for advice, will try to implement some of it’s features at future development.
Just found the extension and im trying it out. Looks great. Also in looking for this I found an active record someone made for mongo already here:
so im not sure if you could use some of the info for mongoRecord or if that will even work for yii. anyhow i have a question. In using mongo record, i see many thing are listed to work. which is cool. But is it possible to get a list of what does NOT work. Above litervollmilch mentioned it couldnt be used with ListWidget. So I am wondering what else cannot be used with it. Are there any other widgets that cannot be used with it? This will help in figuring out how to convert the blog tutorial into using mongoDB (which I hope to post when im done converting it).
Sander’s answer was right, you can’t delete directly if you use findAll() method. You need to iterate and delete it one by one like this:
$items=YourModel::model()->findAll();
foreach($items as $item){
$item->delete();
}
Unfortunately my extension haven’t support yet for deleteAll() method. I forgot this important feature. Will be plan to implement it soon. Thanks for remind me.
Not all method in ActiveRecord supported by this extension. Will try to cover it all. Please go to github repo for this extension and create new ticket. Thanks.