{"action":"opened","issue":{"url":"https://api.github.com/repos/Softmotions/ejdb/issues/161","labels_url":"https://api.github.com/repos/Softmotions/ejdb/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/Softmotions/ejdb/issues/161/comments","events_url":"https://api.github.com/repos/Softmotions/ejdb/issues/161/events","html_url":"https://github.com/Softmotions/ejdb/issues/161","id":102870400,"number":161,"title":"$inc behaves strangely with key that contains only numeric letters","user":{"login":"elendilm","id":11046064,"avatar_url":"https://avatars.githubusercontent.com/u/11046064?v=3","gravatar_id":"","url":"https://api.github.com/users/elendilm","html_url":"https://github.com/elendilm","followers_url":"https://api.github.com/users/elendilm/followers","following_url":"https://api.github.com/users/elendilm/following{/other_user}","gists_url":"https://api.github.com/users/elendilm/gists{/gist_id}","starred_url":"https://api.github.com/users/elendilm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elendilm/subscriptions","organizations_url":"https://api.github.com/users/elendilm/orgs","repos_url":"https://api.github.com/users/elendilm/repos","events_url":"https://api.github.com/users/elendilm/events{/privacy}","received_events_url":"https://api.github.com/users/elendilm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-24T19:15:41Z","updated_at":"2015-08-24T19:15:41Z","closed_at":null,"body":"For a row like below\r\n{ \"stocks\": {  \"72851\": {   }  }  }     trying to update with  $inc: { \"stocks.72851.qty\": 4  }  works Ok.\r\nFor a row like below\r\n{ \"stocks\": {    }  }     trying to update with  $inc: { \"stocks.SOMESTRING72851.qty\": 4  }  works Ok.\r\nFor a row like below\r\n{ \"stocks\": {  }  }     trying to update with  $inc: { \"stocks.72851.qty\": 4  }  behaves strangely & results in\r\n{ \"stocks\": { \"72851\": [4]  }  }  \r\nThe 'qty' key was missing and  '72851' key became an array.\r\n\r\nThe problem only occurs if fieldpath is non-existant and also contains just numbers in string. \r\n\r\n"}}