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

ActiveRecord where clause not working in MongoDB Version 4 #265

Open
nishanthrk opened this issue Oct 17, 2018 · 0 comments
Open

ActiveRecord where clause not working in MongoDB Version 4 #265

nishanthrk opened this issue Oct 17, 2018 · 0 comments
Labels
status:to be verified Needs to be reproduced and validated. type:bug Bug

Comments

@nishanthrk
Copy link

nishanthrk commented Oct 17, 2018

What steps will reproduce the problem?

$query = Log::find()->orderBy(['addedOn' => SORT_DESC]);
$query->andWhere(['actionByType' => 1]);
$countQuery = clone $query;
$pages = new Pagination(['totalCount' => $countQuery->count()]);
$models = $query->offset($pages->offset)
            ->limit($pages->limit)
            ->all();

What's expected?

MongoDB 3.6
Working fine $models as the values

What do you get instead?

MongoDB 4.0
But when I execute the same query which as same data in the collection, Here its not returning any value

Additional info

Q A
Yii version >=2.0.6
Yii MongoDB version >=2.1.0
MongoDB server version 4
PHP version 7.0
Operating system Ubuntu 16.01
@cebe cebe added type:bug Bug status:to be verified Needs to be reproduced and validated. labels Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:to be verified Needs to be reproduced and validated. type:bug Bug
Projects
None yet
Development

No branches or pull requests

2 participants