What Java Model object options are available when writing to MongoDB?

88 Views Asked by At

I am developing a small java application thats employing ModgoDB as its database.

I do not want to have to build my data using Document so I thought to use MongoJack.

however MongoJack doesnt seem to support MongoCollection's.

Also I never seem to get an _id set in my save Objects.

What other options do I have other than MongoJack to save java model objects into MongoDB?

1

There are 1 best solutions below

4
On BEST ANSWER

You can take a look at the Morphia and Spring Mongo. Both of them provide conversion between mongo objects and domain objects.

https://mongodb.github.io/morphia/

http://docs.spring.io/spring-data/mongodb/docs/current/reference/html/