bug: unable to fetch relations tied to the user class with REST api
Issue Description
Unable to fetch relations tied to a user class via the REST api
After creating an "interest" class to house various activities (movies, art, music, etc), I then made a few relations with a specific user through the parse dashboard.
The column in the User class is also called "interest". (perhaps this is no no?)
After making a query to fetch all related interest to a given user, I continue to get an empty array
Steps to reproduce
- Create a user
- Create a new class
- Create a column in the user class as Relational to the newly created class from step 2.
- Query new class objects that belong to a given user
/classes/Interest/?where={"$relatedTo":{"object":{"__type":"Pointer","className":"User","objectId":"<userObjectId>"},"key":"interest"}}
I've verified this query does indeed work if I try to pull relations of a NON-User class. It only appears to fail when the related object is of User. No errors are reported in the console.
(im running the parse server as express middleware)
Expected Results
I expect to receive those "Interest" that are associated with the given User.
Actual Outcome
I get an empty array
Environment Setup
-
Server
- parse-server version : [[email protected]]
- Operating System: [macOS High Sierra 10.13.2]
- Hardware: [Mackbook Pro]
- Localhost or remote server?: [LocalHost]
-
Database
- MongoDB version: [v3.6.0]
- Storage engine: [MongoDB]
- Hardware: [Macbook Pro]
- Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [LocalHost]
not a bug. figured it out.
User needed an underscore (_User) as its a reserved class. Not sure if this was in the docs and I just overlooked. Hope it helps anyone else with the same problem.