aspose file tools*
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
Author

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 customer.store() ?


Groovy
Rick Copeland
author
Greenhorn

Joined: Apr 09, 2013
Posts: 17
    
    5
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: java object and mongodb