Comments (6)
Thank you for your feedback. We use the issue tracker here to track valid bugs in our SDK. Your question seems to be more about how to use Parse. Could you check out the following resources?
- Documentation: https://www.parse.com/docs
- Google Groups: https://groups.google.com/forum/#!forum/parse-developers
- Stack Overflow: http://stackoverflow.com/tags/parse.com
from parse-sdk-js.
Hi @d370urn3ur, we do not send the nested ParseObject's full data to cloud code. In order to get the data of the nested ParseObject, you have to do a query or fetch. The result you get from cloud code is pretty similar to the result you get from ParseQuery. We represent nested ParseObject as pointer and you have to fetch or query it in order to use it.
from parse-sdk-js.
in the JS SDK 1.5.0 you could call object._toFullJSON(["HACK"])
which would include the complete object and any nested children. Haven't tried it on 1.6.
from parse-sdk-js.
@wangmengyan95 I'm not worried about nested objects now. I want an array of top level parse objects. Let's say I have an object Car like
{
"objectID": "1234",
"color": "red",
}
If I do a query and get all of the Car objects in the database, the results of this query should be an array of Car parse objects. So what you're saying is that if I call response.success(carResults), then I should receive an array of Car Parse Objects at the client. Specifically for iOS a Car subclass of PFObject. But that is not what is being sent by response.success(carResults). Instead of
[ {
"objectID": "1234"
"color": "red"
} ]
I get this:
[{
"objectID": "1234",
"className": "Car",
"__type": "Pointer"
}]
So if I want to get the information for this object, I have to call fetch. It's not normal, I am performing one request to get an array of objects and then a request for each object to fetch the rest of the data. request.success() is modifying the carResult and converting the objects into pointers. I don't know if its supposed to work like that or not, it seems like a bug to me. This kind of workflow doesn't make any sense, the goal is to minimize the number of network requests.
from parse-sdk-js.
Which version of the SDK are you using with Cloud Code? There was an issue with this, but it has since been resolved.
from parse-sdk-js.
I was on latest, so theoretically 1.6.7. I manually specified 1.6.7 just in case, and now it is working. I don't know what latest is pointing to but that seems to have been the problem. Thanks you guys for your help!
from parse-sdk-js.
Related Issues (20)
- API Reference Documentation not updated HOT 1
- SDK throws error in web contexts where calling into `window.indexedDB` is prohibited, but not undefined on the window HOT 2
- Calling `.add` multiple times on relations is broken HOT 4
- Refused to get unsafe header "access-control-expose-headers" on Chrome HOT 17
- Allow for REST Content Override for Server protection HOT 2
- Align currently supported Node.js version HOT 4
- `Parse.User.verifyPassword` does not pass request options to server HOT 5
- Parse SDK 4.3.1 is not working with React Native / Expo HOT 9
- Expo RN and ParseLiveQuery EventEmitter error HOT 13
- Cannot set ACL from JSON HOT 1
- Infinite loop in `encode.js` HOT 5
- Missing test for `Parse.User.verifyPassword` option `ignoreEmailVerification` HOT 2
- `Parse.Object.set` sliently handles validation errors HOT 1
- TypeError: attempted to use private field on non-instance, js engine: hermes HOT 3
- Installation support for JS SDK HOT 4
- Allow to run queries through LiveQueryClient (Parse Server issue #9086) HOT 5
- Local state of objects not correct if setting multiple properties HOT 2
- LocalDatastore tests fail HOT 4
- Parse.Installation doesn't handle deleted Installation objects on server HOT 3
- Replace dependency ip-node HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parse-sdk-js.