Open ziaratban opened 4 years ago
Q | A |
---|---|
Is bugfix? | yes |
New feature? | no |
Breaks BC? | no |
Tests pass? | yes |
Fixed issues | #290 |
@samdark what is milestone for this PR ?
2.1.10. Overall it looks extremely hacky. Need @yiisoft/core-developers and @yiisoft/reviewers opinions about it.
Some more explanation why this is better would be nice. Did you benchmark this?
Also test do not pass.
@schmunk42 the explanation is in https://github.com/yiisoft/yii2-mongodb/issues/290
How about
public function exists($db = null, $optimized = false)
and do the modifications when $optimized
is true
.
@schmunk42 does it make sense to do it in non-optimized way?
@schmunk42 does it make sense to do it in non-optimized way?
I am no mongo expert, my concern is only about BC.
Counterquestion: Why is it not done by mongo, if it makes no difference?
@schmunk42 does it make sense to do it in non-optimized way?
@samdark please see Checking if a document exists – MongoDB slow findOne vs find
The link could be added to comment since the code there causes questions immediately.