answer.setUpdatedAt(new Date());
dao.runNoError(new Callback<DB>() {
public void invoke(DB db) {
dao.save(answer);
Moo moo = Moo.NEW();
moo.push("answers", new DBRef(db, "answer", new ObjectId(answer.getId())));
dao.update(Question.class, Moo.NEW("id", questionId), moo);
}
});
commons.fresh(Question.class, questionId);
return Ajax.ok();