Welcome
Login
Sign up
Home
Solutions
Forums
How can we help you today?
Enter your search term here...
Search
Login
or
Signup
to submit a new ticket
Check ticket status
Start a new topic
Discussions
Kinvey Forums
Business Logic
CollectionAccess query by id
L
Logan Maire
started a topic
about 7 years ago
Can anyone tell me why the following code returns no records? - I can query by any other field other than _id and it works. Wh at am I doing wrong?
modules.collectionAccess.collection("buildings").find( { "_id" : "521e140bf7e11df93e011711"} , function (err, object) { ...
Any Ideas?
2 Comments
Oldest First
Popular
Newest First
Sorted by
Oldest First
T
Tony Lenz
said
about 7 years ago
Try modules.collectionAccess.objectID("521e140bf7e11df93e011711") instead of just "521e140bf7e11df93e011711".
L
Logan Maire
said
about 7 years ago
That worked! Awesome! Thanks for your help!
Login
or
Signup
to post a comment
More topics in
Business Logic
How do I access query string values for GET and DELETE requests?
Basic Authentication in Business Logic
How do I cascade delete entities from related collections?
All BL failing with Violation Error
How do I send push notifications?
Whenever I try to query by _id, I get zero results
receiving SOCKETTIMEDOUT when requesting external http response
Unique Constraints on a collection column?
Need some help with grouping
Accessing Endpoint from Collection Hook
See all 342 topics
Logan Maire
modules.collectionAccess.collection("buildings").find( { "_id" : "521e140bf7e11df93e011711"} , function (err, object) { ...
Any Ideas?