-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Typecast $column to string when ordering #2419
Conversation
Hello, Tests are failing, please check and let me know. Thanks! |
Hi Thanks for your comment. That one test failing in Mongo v4.2 cannot be related to this PR. For me, it looks like some kind of race condition since it is comparing timestamps and there is a one-second difference. So if possible, can you re-run the tests to see them pass? |
Codecov Report
@@ Coverage Diff @@
## master #2419 +/- ##
=========================================
Coverage 87.62% 87.62%
Complexity 676 676
=========================================
Files 31 31
Lines 1551 1551
=========================================
Hits 1359 1359
Misses 192 192
Continue to review full report at Codecov.
|
Hi @divine I think the tests were re-run now and all passed. |
Hello, I've rerun tests but not sure how this could be the problem with that package as they state no support for this package filamentphp/filament#1365? Can you add a test to see what values pass this package and do indeed solve the problem? Thanks! |
Hi Thanks for the link. Filament works actually very well with Mongo, just few minor issues and this fixes the other one. |
I will add tests for this. |
Since
$column
parameter in Illuminate/Database/Query/Builder.php can take other types than strings, it makes sense to typecast this into a string.This came up when using Filament Admin panel with Mongo, where orderBy doesn't work since the $column passed to orderBy isn't a string, but a Stringable object. There are probably other places also with a similar need and I will provide more PR:s as I find them.