Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java object and mongodb

 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi author,

Can we store java object directly into mongodb ? I mean something like customer.store() ?
 
Rick Copeland
author
Greenhorn
Posts: 17
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic