errorContext.setMoreInfo(null);
errorContext.setObjectId(null);
statement.setSqlMapClient(client);
if (cacheModelName != null && cacheModelName.length() > 0 && client.getDelegate().isCacheModelsEnabled()) {
CacheModel cacheModel = client.getDelegate().getCacheModel(cacheModelName);
mappedStatement = new CachingStatement(statement, cacheModel);
} else {
mappedStatement = statement;
}
rootStatement = statement;
delegate.addMappedStatement(mappedStatement);