Forum BigDB Convert Database Object To Array ?

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

Convert Database Object To Array ?

Postby kidkid » March 4th, 2011, 1:25 pm

Hi,

Currently, I create a table like that:

Code: Select all
Rom
{
     Name: xyz,
     Max: 10,
     RoomCollect{
              R1{
                   Name:  ABC,
                   ID: "$%^&",
                   Count: 1
                  },
             R2{
                   Name:  DEF,
                   ID: "$%^&",
                   Count: 1
             }
     }
}

So when I get this record, I have a database object.
but I can't convert dbObject.RoomCollect to Array or something like that.

How could I get over this situation ?

P/S: I am thinking using RoomCollect is a array.
kidkid
 
Posts: 54
Joined: December 1st, 2010, 4:43 am

Re: Convert Database Object To Array ?

Postby Henrik » March 5th, 2011, 12:06 pm

You have to set the type of RoomCollect to DatabaseArray from the start, you can't convert from one type to another after the property has been created.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm


Return to BigDB



cron