Forum BigDB Creating database objects on registering

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

Creating database objects on registering

Postby TheStrategist » March 29th, 2013, 5:22 pm

I have quite a simple question and am just looking for confirmation.

When a player registers using quickConnect, I want to create a DatabaseObject for the player's stats. Now the way I have it right now is using the client.bigDB.createObject() with Access Rights to create. For the obvious reasons(?) I'd much rather prefer after successful registration it goes to the server to create the DatabaseObject. Would I need a service room to accomplish just this? Is there another way or am I just missing something with the "secureness" of what I am currently doing above?

Any help is appreciated, thanks.
TheStrategist
 
Posts: 5
Joined: March 23rd, 2013, 11:53 pm

Re: Creating database objects on registering

Postby Henrik » March 29th, 2013, 5:51 pm

Is there a reason you're not using the PlayerObject, and instead create objects in a different table?

If you give the access right 'Full Creator Rights' instead of 'Create', then each user can only access the objects they themselves have created, which sounds like the thing you want?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Creating database objects on registering

Postby TheStrategist » March 29th, 2013, 10:36 pm

EDIT: Nevermind I found it out by messing around... it really was quite simple xD

I called loadMyPlayerObject, if the property under the key (which is connectUserId since it is using PlayerObjects table) is null/doesn't exist then give it a value and save the DatabaseObject. Therefore avoiding the issue I had above and what Henrik was suggesting, I just didn't understand at first how.

I was looking at it logically in a different way, like how can the player first create the objects.

Thanks Henrik
TheStrategist
 
Posts: 5
Joined: March 23rd, 2013, 11:53 pm


Return to BigDB