Hi there,
The documentation doesn't say - does CreateObject() overwrite any pre-existing object with the same key?
If not, how do you do that?
Cheers, Paul.
by wildbunny » June 23rd, 2011, 9:38 pm
by Henrik » June 23rd, 2011, 10:16 pm
by wildbunny » June 24th, 2011, 12:23 pm
by Henrik » June 24th, 2011, 1:11 pm
by wildbunny » June 24th, 2011, 2:54 pm
by jasonMcIntosh » June 24th, 2011, 7:50 pm
by wildbunny » June 25th, 2011, 11:53 am
jasonMcIntosh wrote:Since the object's schema is game-specific, there's no easy way to have the object "reset" from the PlayerIO API (unlike SQL).
It's not hard to wrap your DatabaseObject instances and provide this functionality yourself, though.
by Henrik » June 25th, 2011, 12:41 pm
by wildbunny » June 25th, 2011, 2:51 pm
Henrik wrote:Let's back up a bit...
What are you trying to do? What functionality requires you to replace entire BigDB objects regularly?
by jasonMcIntosh » June 27th, 2011, 1:34 pm
wildbunny wrote:My use case is basically saving individual players - for simplicity I just turn each player into a BigDB object and write them to PlayerObjects; i don't bother to write only changes, I just write the entire object. Its more robust that way...
by wildbunny » June 27th, 2011, 1:48 pm
jasonMcIntosh wrote:wildbunny wrote:My use case is basically saving individual players - for simplicity I just turn each player into a BigDB object and write them to PlayerObjects; i don't bother to write only changes, I just write the entire object. Its more robust that way...
From what I understand, PlayerIO only saves deltas under the hood (unless you are explicitly deleting BigDB objects), so it sounds like what you are doing is not necessary.
by Henrik » June 27th, 2011, 2:09 pm
wildbunny wrote:My use case is basically saving individual players - for simplicity I just turn each player into a BigDB object and write them to PlayerObjects; i don't bother to write only changes, I just write the entire object. Its more robust that way...
wildbunny wrote:Of course this means I need to delete and then create every time, hence the requirement for REPLACE like functionality
by wildbunny » June 27th, 2011, 2:48 pm
by Oliver » July 2nd, 2011, 10:12 am
by Oliver » July 2nd, 2011, 10:35 am