Question about int

May 29, 2011 at 11:50 PM


Thank you for providing this great tool.

This question is regarding Simple Savant version.

I am a beginner and I have encountered a problem when inserting an int value. 

I have a class with a property of int type and when this property assumes the value of 7, the SimpleDB shows it as 10000000007 in tools like SDB and AWS SimpleDB Browser. Also, when I run a select from these tools like this:

select Status from ApptTest where Status = '10000000007'

I find the rows!

Now using the Simple Savant, when I run a select listing all the rows, I get the correct value of 7 and I don't see any rows with the strange leading 1000000000 digits.

Any suggestions?




May 30, 2011 at 5:36 AM

I'm glad you're finding the library useful!

You should read through the documentation on default and custom number formatting in Defining Object Mappings. That should fully answer your questions.

The short answer is that since SimpleDB stores everything as a string, signed numbers must be padded and offset by a fixed value to ensure that sorting and comparisons work properly. And it's very easy to turn this off if you don't need it.

- Ashley

May 30, 2011 at 6:26 PM


Thank you very much for your prompt and comprehenisve answer.

Great work.

EK / Foreverlearning