GithubHelp home page GithubHelp logo

Comments (6)

parse-github-bot avatar parse-github-bot commented on July 20, 2024

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?

from parse-sdk-js.

wangmengyan95 avatar wangmengyan95 commented on July 20, 2024

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.

roddylindsay avatar roddylindsay commented on July 20, 2024

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.

d370urn3ur avatar d370urn3ur commented on July 20, 2024

@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.

andrewimm avatar andrewimm commented on July 20, 2024

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.

d370urn3ur avatar d370urn3ur commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.