File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes MongoDB and the fly likes java object and mongodb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » MongoDB
Bookmark "java object and mongodb" Watch "java object and mongodb" New topic

java object and mongodb

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Hi author,

Can we store java object directly into mongodb ? I mean something like ?

Rick Copeland

Joined: Apr 09, 2013
Posts: 17
Using just the native Java driver, no, you have to construct special BSON objects. However, there is an open-source "Object-Document Mapper" available for Java called Morphia. I have not used it myself, but I have heard good things about it.
I agree. Here's the link:
subject: java object and mongodb