Spring data mongoDB saving incomplete java Bitset Object
I am working in mongoDB in java. I want to save java Bitset Object in db and since only BSON native types can be converted from their Java counterparts, I have to use mapper libs. 

I used Mongo Morphia Mapper and save Bitset object successfully. But I require to do same using Spring Data MongoDB libs. But using spring libs Bitset Object is not saved and there is no error while saving. And when i retrieve same Object i get empty biset object.  Below is how data was saved in mongo database using Morphia and Spring respectively :

**Morphia**

1. { "_id" : "testid", "name" : "spring", "bit" : **{ "words" : [ NumberLong(132) ], "wordsInUse" : 1, "sizeIsSticky" : true }** }


**Spring**

2. { "_id" : "testid", "name" : "spring", "bit" : **{ "words" : [ NumberLong(132) ] }** }


By complaring the two I noticed that Biset information using spring is not saved completely(bold part). This might be reason for empty Bitset Object. I am using 'spring-data-mongodb-1.0.0.M4.jar' for saving. Please can anyone tell where I am wrong. I would appreciate your help.

Thanks
  
Shubhra 
Spring data mongoDB saving incomplete java Bitset Object
===

I am working in mongoDB in java. I want to save java Bitset Object in db and since only BSON native types can be converted from their Java counterparts, I have to use mapper libs. 

I used Mongo Morphia Mapper and save Bitset object successfully. But I require to do same using Spring Data MongoDB libs. But using spring libs Bitset Object is not saved and there is no error while saving. And when i retrieve same Object i get empty biset object.  Below is how data was saved in mongo database using Morphia and Spring respectively :

**Morphia**

1. { "_id" : "testid", "name" : "spring", "bit" : **{ "words" : [ NumberLong(132) ], "wordsInUse" : 1, "sizeIsSticky" : true }** }


**Spring**

2. { "_id" : "testid", "name" : "spring", "bit" : **{ "words" : [ NumberLong(132) ] }** }


By complaring the two I noticed that Biset information using spring is not saved completely(bold part). This might be reason for empty Bitset Object. I am using 'spring-data-mongodb-1.0.0.M4.jar' for saving. Please can anyone tell where I am wrong. I would appreciate your help.

Thanks
  
Shubhra 