Forum ‹ BigDB ‹ Bug: Indexing on String vs. Long for large numbers
3 posts
• Page 1 of 1
Bug: Indexing on String vs. Long for large numbers
I recently tried to create an index on my PlayerObject table using a user's Facebook ID (which is stored as an object property). These IDs are completely numerical, and up to 15 digits in length. How many digits can be stored in a long? Building the index as a long on this 15-digit FB ID doesn't work (the index never seems to build). Building it as a string works fine, though. Is this expected behavior?
- cjcenizal
- Paid Member
- Posts: 116
- Joined: March 29th, 2011, 12:31 am
Re: Bug: Indexing on String vs. Long for large numbers
That is because you've saved the value (from flash probably) as a string. It's a string with a numeric value, like this: "12345". We don't try to auto-cast values from one data type to another, so you have to be sure to store values in the right type.
- Oliver
- Oliver
-

Oliver - .IO
- Posts: 1136
- Joined: January 12th, 2010, 8:29 am
Re: Bug: Indexing on String vs. Long for large numbers
Ah, that makes sense. Thanks, Oliver.
- cjcenizal
- Paid Member
- Posts: 116
- Joined: March 29th, 2011, 12:31 am
3 posts
• Page 1 of 1