parse.com - What does includeKey do ? -


i'm confused pfquery's includekey: method. have instance of class foo containing string property name 'state' , pointer class instance (say bar instance) 'bar'.

when query instances of foo want info on bar instance related too:

let query = pfquery("foo")     .wherekey("state", equalto: "active")     .includekey("bar") 

does fetch bar instance properties ? such can do:

let foo = query.getfirstobject() as! foo // access bar property foo.bar.baz = "yep" 

what if foo bar property not pointer object ?

thanks

b.

yes, "includekey" include 'bar' pfobject in query results.

in swift should cast "bar" pfobject in order access properties.

if let bar = foo["bar"] as? pfobject {     println(bar["baz"]) } 

Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -