Hi,
We have employee Documents in MongoDB (Please see below for the sample) and we retrieve these documents in a list of org.bson.Document objects by using MongoDB Java Driver 3.0.4 . We need to map this list of org.bson.Document objects to list of plain old java objects of type Employee. Please let me know if there is any API or library from MongoDB for doing the same.
{
"_id":ObjectId("231be1ae4e51b95"),
"employeeId":"312000",
"employeeName":"Peter",
"employeeSal":21000.43,
"creationDate":ISODate("2015-11-30T05:38:48.000+0000"),
lastUpdateDate:ISODate("2015-11-30T05:38:48.000+0000"),
"employAddress":[
]
}
Hi Kiran,
There are several third party libraries available to help you implement this. I would suggest taking a look on the Third Party Frameworks and Libraries:POJO Mappers in MongoDB java driver docs.
Regards
Ankur