0

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?

Hector
  • 4,016
  • 21
  • 112
  • 211

1 Answers1

1

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/

s7vr
  • 73,656
  • 11
  • 106
  • 127
  • Morphia looks like a really nice alternative. Thanks for your suggestion. – Hector Nov 16 '16 at 11:56
  • I've hit an issue with Morphia, it doesnt support Java 8 LocalDateTime. – Hector Nov 16 '16 at 12:46
  • Java 8 time is supported in upcoming release. Till then you may have to add your custom converter. https://github.com/mongodb/morphia/tree/master/morphia/src/main/java/org/mongodb/morphia/converters – s7vr Nov 16 '16 at 12:56
  • thanks i had found this one https://github.com/mongodb/morphia/blob/master/morphia/src/main/java/org/mongodb/morphia/converters/LocalDateTimeConverter.java – Hector Nov 16 '16 at 13:05