/**
* call postSaveOperations and returns Key for entity.
*/
protected <T> Key<T> postSaveGetKey(T entity, DBObject dbObj, DBCollection dbColl, Map<Object, DBObject> involvedObjects) {
if (dbObj.get(Mapper.ID_KEY) == null)
throw new MappingException("Missing _id after save!");
postSaveOperations(entity, dbObj, involvedObjects);
Key<T> key = new Key<T>(dbColl.getName(), mapr.getId(entity));
key.setKindClass((Class<? extends T>) entity.getClass());