playMaker

Author Topic: Parse Milti-property get and set.  (Read 3276 times)

Bellesteck

  • Playmaker Newbie
  • *
  • Posts: 22
Parse Milti-property get and set.
« on: June 22, 2014, 08:48:34 PM »
Hello!
I would like to request an action for the parse interface that allows multi-property interaction. Such as, I have a class in parse named character and I would like to access the stored object's info when a user logs in. So When I fire up the successful login event that has this action, it will allow me to get multiple properties with one request, opposed to the currently implemented action which only allows one property per request. I would make the action and post it myself, but lets just say there's a reason I'm using playmaker.  ;)
Thanks in advance!
Marshall.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Parse Milti-property get and set.
« Reply #1 on: July 03, 2014, 01:04:13 AM »
Hi,

 You don't make a request per access of a property. what you do is retrieve the object, then my system stores it locally in the cache, and then you can freely access any number of times its properties, it will not request that property from the parse server, but get it from the cached object.

Does that make sense? Same with setting object properties, you need to use "sav async" to push your changes to the parse server, and that needs to be done only once regardless of the number of properties you changed prior calling "save async".


bye,

 Jean

Bellesteck

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Parse Milti-property get and set.
« Reply #2 on: July 03, 2014, 10:54:25 PM »
OOOHHHHH!
Gotcha. Sorry, there wasn't any documentation on the way it works. (any that I saw anyway. )  ::)

Bellesteck

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Parse Milti-property get and set.
« Reply #3 on: July 03, 2014, 11:05:34 PM »
Hey, I do have a question regarding the object ID of saved objects. Is there any way that a playmaker action can set an object ID on creation?
For instance if I have a class called characters and I have playmaker parse look for the name entered by the player (the authenticated email address after login that is the objectID) and if it doesn't exist it will ask to create one. so in this case setting the objectID would be Extremely useful. I know that I can just have a query look for the email address if it is stored in the object as a property, but it will take me a while to figure it out. Any thoughts?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Parse Milti-property get and set.
« Reply #4 on: July 05, 2014, 04:40:24 AM »
Hi,

 It's critical that you read the Parse documentation itself, even if using code, it's very well explained nonetheless and I have matched most actions to the actual related api call, so you will be able to related a line of code with playmaker actions.

https://www.parse.com/docs/unity_guide#objects

Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Parse Milti-property get and set.
« Reply #5 on: July 05, 2014, 04:43:10 AM »
Hi,

 You can't set the object Id, that would cause too much trouble for you and Parse.

Whyt would setting the object in your case would be useful? objectId is a byproduct, it's always something you catch and store for reference so it doesn't matter the actual id, you only cache it.

 In your case ( If I understood), when you create your character class, store that object Id when you create it, that's all, parse will take care of creating that object id for you.


 Bye,

 Jean

Bellesteck

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Parse Milti-property get and set.
« Reply #6 on: July 06, 2014, 11:42:54 AM »
I understand now. Thanks for your help Jean!