Boris Granveaud
unread,Jul 7, 2010, 5:10:17 AM7/7/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
Hi,
I've noticed that when I insert a document in shell, numbers are
always float even if they could be stored as integer.
For exemple:
db.test.insert({value:0});
When I load this document in Java, value is a Double. This is annoying
because my application manipulates Integer but if I insert by hand a
document to do a test, I got a Double. So I have to handle both cases
like this:
int value = ((Number) dbObject.get("value")).intValue();
not very nice....
Boris.