Save original query from analysis before wrapping it

This commit is contained in:
Raul Ochoa 2016-05-19 11:41:06 +02:00
parent 8628d3b671
commit c7f37047b0

View File

@ -145,6 +145,7 @@ AnalysisMapConfigAdapter.prototype.getMapConfig = function(analysisConfiguration
var analysisSql = layerQuery(layerNode); var analysisSql = layerQuery(layerNode);
var sqlQueryWrap = layer.options.sql_wrap; var sqlQueryWrap = layer.options.sql_wrap;
if (sqlQueryWrap) { if (sqlQueryWrap) {
layer.options.sql_raw = analysisSql;
analysisSql = sqlQueryWrap.replace(/<%=\s*sql\s*%>/g, analysisSql); analysisSql = sqlQueryWrap.replace(/<%=\s*sql\s*%>/g, analysisSql);
} }
layer.options.sql = analysisSql; layer.options.sql = analysisSql;