save « mongodb « Java Database Q&A





1. Mongo Database save data from Map    stackoverflow.com

I have the below code which works:

            if(aDBCursor.hasNext()){
            ...

2. Morphia saves new entities instead of update _id    stackoverflow.com

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

@Entity("Vacancy")
public class Vacancy {

@Id
private ObjectId id;
@Version
long version;

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