-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Search on a field that contain special characters #2062
Unanswered
alexcagliari87
asked this question in
General
-
- Laravel-mongodb Version: 3.6
- PHP Version: 7.2
- MongoDB 4.2
Description:
It's impossible to search in a field that contains special characters like / or + or -.
I have a document like this:
{
"_id" : ObjectId("5f04580972af7f797e3cbcfc"),
"operationsDone" : NumberInt(599),
"inserted_at" : ISODate("2020-07-07T11:10:01.031+0000"),
"updated_at" : ISODate("2020-07-07T11:10:01.031+0000"),
"owner" : "5tz99qECeaLScwaAwYmvJ7c3TRugdimp0xf/12aKrmaWnbwhfUHoYWnSgMxaTQ0YeAl2ZLLKW4r3XNVJIb7Xs12tSCO2R66VsuXJ1N6j+XQYssVEht4vL2EEEsNpx/1u"
}
Steps to reproduce
- Insert this document
- $response = self::where('owner','5tz99qECeaLScwaAwYmvJ7c3TRugdimp0xf/12aKrmaWnbwhfUHoYWnSgMxaTQ0YeAl2ZLLKW4r3XNVJIb7Xs12tSCO2R66VsuXJ1N6j+XQYssVEht4vL2EEEsNpx/1u');
- We can't find any results
Expected behaviour
We have to find one result
Actual behaviour
No results found
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment