Closed
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest versions of Parse Server and the Parse JS SDK.
Issue Description
I have a problem with saving and getting first object using Parse.Query
in JS. The most strange thing is that in other my projects this code works seamlessly. I think that they are connected to each other, so I report about both of them in one time
await Parse.Query.first()
is resulting in exception, while(await Parse.Query.find())[0]
works correctlyParse.Object.save()
is resulting in undefined, not in issue
Steps to reproduce
Code to reproduce the new Parse.Query.first()
problem:
const record = Parse.Object.extend('SyncVisitRecord'); //my class name string
const query = new Parse.Query(record);
query.equalTo("key", key);
const record1: Parse.Object = await query.first();
Code to reproduce the new Parse.Object.save()
problem:
const record = Parse.Object.extend('SyncVisitRecord'); //my class name string
const query = new Parse.Query(record);
query.equalTo("key", key);
const record1: Parse.Object = await (await query.find())[0];
record1.set('lang', "us");
record1.save()
.then((gameScore) => {
console.log(gameScore)
}, (error) => {
console.log(error)
})
Actual Outcome
new Parse.Query.first()
problem outcome isTypeError: Cannot read properties of undefined (reading 'className') at eval (parse.js:18430:39)
Parse.Object.save()
problem outcome isundefined
Expected Outcome
- I wait for regular Parse.Object
- I wait for the saved object in db and regular Parse.Object in console
Environment
Server
- Parse Server version:
^5.2.1
- Operating system:
Ubuntu 22.04.1 LTS
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Oracle Cloud
Database
- System (MongoDB or Postgres):
MongoDB
- Database version:
^5.0.9
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
Local
Client
- Parse JS SDK version:
^3.5.0