protected <T> Key<T> save(final DBCollection dbColl, final T entity, final InsertOptions options) {
final MappedClass mc = validateSave(entity);
final LinkedHashMap<Object, DBObject> involvedObjects = new LinkedHashMap<Object, DBObject>();
final DBObject document = entityToDBObj(entity, involvedObjects);
final Object idValue = document.get("_id");
WriteResult wr = tryVersionedUpdate(dbColl, entity, document, idValue, enforceWriteConcern(options, entity.getClass()), mc);
if (wr == null) {
saveDocument(dbColl, document, options);
}
return postSaveOperations(singletonList(entity), involvedObjects, dbColl.getName()).get(0);
}