Forum BigDB Bizarre problem using LoadOrCreate() - old properties linger

Discussion and help relating to the PlayerIO database solution, BigDB.

Bizarre problem using LoadOrCreate() - old properties linger

Postby wildbunny » July 12th, 2011, 5:35 pm

Hi guys,

Since I've moved over to LoadOrCreate() from DeleteKeys() and CreateObject() I've been noticing a very odd problem; certain nested properties inside a DatabaseObject don't seem to get updated when Save()ed despite them showing as being different in the debugger.

I've inspected the http packets in Fiddler and I can see it sending old data which shouldn't be getting saved, since it was changed.

Its not all properties; for example the properties on the root of the DatabaseObject are getting updated ok, but I've got a hierarchy like this:

Code: Select all
playerRoot (object)
   m_inventory (object)
      m_items(array)
         0
            ...
         1
            ...


And its the individual items in the array which don't get saved correctly...

I've no idea how to proceed! :)

Cheers, Paul.
wildbunny
 
Posts: 217
Joined: March 9th, 2011, 10:35 am

Re: Bizarre problem using LoadOrCreate() - old properties linger

Postby Oliver » July 13th, 2011, 11:53 am

Hey Paul,

What you're describing sounds weird, but it doesn't ring any bells, so i'm not able to just tell you what it is, and how to fix it.

Is it in the ServerSide code or AS3? I'm guessing ServerSide. If so, can you boil it down to a reproducible example project in either C# or AS3? You should be able to copy the relevant code over to a new project using just the Player.IO Standalone C# client.

odd behaviors needs fixing ;)

Best
- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Bizarre problem using LoadOrCreate() - old properties linger

Postby wildbunny » July 13th, 2011, 12:35 pm

Ok, if I'm able to reproduce this - can I send you my project zipped up? :)

Cheers, Paul.
wildbunny
 
Posts: 217
Joined: March 9th, 2011, 10:35 am

Re: Bizarre problem using LoadOrCreate() - old properties linger

Postby wildbunny » July 13th, 2011, 1:01 pm

Ok, managed to repro this...

More info: on closer inspection in Fiddler, the correct data *is* getting sent over http, but it never sticks in BigDB.

I'll mail you my repro case :)

Cheers, Paul.
wildbunny
 
Posts: 217
Joined: March 9th, 2011, 10:35 am

Re: Bizarre problem using LoadOrCreate() - old properties linger

Postby wildbunny » July 18th, 2011, 10:03 am

Did you receive my mail I sent last week? :)

In case not, the repro case seems to be asking bigdb to Save() an object containing a blank DatabaseArray over the top of one which contains some data; the DatabaseArray is never altered in this case...

Cheers, Paul.
wildbunny
 
Posts: 217
Joined: March 9th, 2011, 10:35 am


Return to BigDB