Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with yii\mongodb\ActiveRecord #30

Open
antdel opened this issue Nov 2, 2016 · 1 comment
Open

Use with yii\mongodb\ActiveRecord #30

antdel opened this issue Nov 2, 2016 · 1 comment
Assignees

Comments

@antdel
Copy link

antdel commented Nov 2, 2016

Is there any workaround in order to use this behavior with MongoDB based ActiveRecord?

I'm getting this error in Chrome network tab when using any of the control buttons in sortable column of GridView.

"Valid ActiveRecord model class must be specified in order to find model."

I tried to bypass the above error by changing the SortController->beforeAction() in order to check also for yii\mongodb\ActiveRecord, but then I am getting the following error:

"Calling unknown method: yii\mongodb\ActiveQuery::addSelect()"

So it seems to me that the addSelect() method is not implemented in mongodb ActiveQuery and prevents using the behavior with mongo (but works fine with yii\db\ActiveRecord).

Any ideas?

@arogachev
Copy link
Owner

@antdel Initially it was not designed for using with MongoDB. but it's a good idea to add support for it. I'll try to add it soon.

@arogachev arogachev self-assigned this Nov 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants