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
Get Object(user) from the users datastore?
N
Nico Barelmann
started a topic
almost 7 years ago
Hey,
i am trying to get an user object from the users datastore - but it doesn't seem to work.
i thought i could handle it like i handle references to other datastores - like this:
modules.collectionAccess.collection('events').findOne({"_id":modules.collectionAccess.objectID(eventID)}, function (err, docs) {
.....
....
.....
But for any reason this does not work with users - any idea? (Or a hint in the docs i am missing?)
Best, Nico
2 Comments
Oldest First
Popular
Newest First
Sorted by
Oldest First
Gal
said
almost 7 years ago
Hi Nico,
That should work, but one thing to note is that the collection is called "user" and not "users". If this does not solve your problem, can you reply with the actual query you are attempting to execute?
N
Nico Barelmann
said
almost 7 years ago
Oh boy - that does the trick...
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
Nico Barelmann
i am trying to get an user object from the users datastore - but it doesn't seem to work.
i thought i could handle it like i handle references to other datastores - like this:
modules.collectionAccess.collection('events').findOne({"_id":modules.collectionAccess.objectID(eventID)}, function (err, docs) {
.....
....
.....
But for any reason this does not work with users - any idea? (Or a hint in the docs i am missing?)
Best, Nico