google-code-export / morphia

Automatically exported from code.google.com/p/morphia
1 stars 0 forks source link

Query returns NULL if trying to fetch a record on Integer values #319

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version are you using? (Morphia/Driver/MongoDB)
0.99/2.1/1.8.3
Please include a stack trace below:

I have dumped 20 Million records from SQLServer to MongoDB using 
mongoimport.One sample document is :

{
  "_id": "4e5f67dc36c3c7a7de0cb011",
  "merchantCommId": 10,
  "name": "PCP-SAMR225-CELLULAR INNOVATION PCP-SAMR225 PREMIUM CAR CHARGER FOR SAMSUNG   R225",
  "merchantCatId": 589,
  "UPC": 758303000000,
  "URL": "http://www.limitedgoods.com/itemView.php?ProdID=100105",
  "CatagoryCode": "MAIN_9",
  "COO": "",
  "Type": "",
  "hasWeight": 1,
  "Restriction": "",
  "weight": 1,
  "Length": 0,
  "width": 0,
  "Height": 0,
  "volume": "",
  "source": "E4X"
}
if I try to fetch the record on "merchantCommId", it returns me null whereas if 
I query on "name" or "UPC", it does give me the results.I have also attached my 
domain class. pls help
  Query q = ds.createQuery(Profile.class).field("merchantCommId").equal(10);

Original issue reported on code.google.com by abhishek...@gmail.com on 2 Sep 2011 at 1:11

Attachments: