save « mongodb « Java Database Q&A

1. Mongo Database save data from Map

I have the below code which works:


2. Morphia saves new entities instead of update _id

Sorry for very dumb question. I'm using Morphia 1.00. Have some entity:

public class Vacancy {

private ObjectId id;
long version;

private String title;
and some other fields, setter and getters. Trying to save identical instances:
Vacancy vacancy1 = new ...