I have _User, company andjob class.Company class has one column type Relation pointing _User class and Job class has one column type Relation pointing company class.
Now I want my users to create job where parse cloud code will find the user's company based on his user object req.user
for example,
company CP belongs to user U. when U will hit the job create endpoint with his session token, a new document in the job table will be added with company CP. Here's what i've tried but it returns all the company list
let query = new Parse.Query('company');
user.get('vz5tF2g4Pi')
.then(u => {
//query.
return query.find('users', u)
})
.then(rs => console.log('.... ', rs))
.catch(err => console.log('err ', err))