From: Russell Bateman <r...@windofkeltia.com>
Date: Mon, 17 Sep 2012 16:19:58 -0600
Local: Mon, Sep 17 2012 6:19 pm
Subject: Re: [mongodb-user] Insertion of integer becomes double as a result of JavaScript
Yes, that's it. Thanks, Scott.
On 9/17/2012 3:41 PM, Scott Hernandez wrote:
> You want to use NumberInt in javascript, much like NumberLong (for java Long)
> http://www.mongodb.org/display/DOCS/Overview+-+The+MongoDB+Interactiv...
> On Mon, Sep 17, 2012 at 4:15 PM, Russell Bateman <r...@windofkeltia.com> wrote:
>> this.addresstype = ( Integer ) bson.get( "addresstype" );
>> In the debugger, I see
>> ... "addresstype": 1.0
>> etc. Obviously, I crash with:
>> java.lang.Double cannot be case to java.lang.Integer
>> How should I write this field in my JS script?
>> Thanks in advance.
>> db.accounts.insert(
>> "username":venkatname1,
>> "accountdata" :
>> "addresses" :
>> --
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||