//TODO remove this after testing.
if (dbColl == null)
dbColl = getCollection(((QueryImpl<T>) query).getEntityClass());
QueryImpl<T> qi = ((QueryImpl<T>) query);
EntityCache cache = createCache();
if (log.isTraceEnabled())
log.trace("Executing findAndModify(" + dbColl.getName() + ") with delete ...");
DBObject result = dbColl.findAndModify(qi.getQueryObject(), qi.getFieldsObject(), qi.getSortObject(), true, null, false, false);