Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 8904

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.


My book: [MongoDB Applied Design Patterns]
My blog: [Just a Little Python]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java object and mongodb
 
Similar Threads
* Welcome Kyle Banker
Connection to a MongoDB
How to insert into MongoDB
MongoDB and Java
Embedded MongoDB?