loopback icon indicating copy to clipboard operation
loopback copied to clipboard

passing number filter in url API loopback?

Open sumitha opened this issue 12 years ago • 2 comments

How do I filter the url to get the data to the customer phone number instead of its id. I sent the url is http://strongloop.myweb:3000/customers?filter[where][phone]=+6486775353 but why nothing comes up with that parameter? whereas the data in the db is appropriate

sumitha avatar Dec 04 '13 23:12 sumitha

I’m able to reproduce the problem with LoopBack with mongodb connector. It’s due to the fact that we coerce numbers from the query string. The mongodb connector doesn’t match phone=1000 to phone=‘1000’.

sumitha avatar Dec 04 '13 23:12 sumitha

The issue has been fixed by https://github.com/strongloop/loopback-datasource-juggler/pull/47

raymondfeng avatar Feb 28 '14 20:02 raymondfeng