summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2011-12-11 21:37:21 (EST)
committer mwu2011-12-11 21:37:21 (EST)
commit0235155b7007fbcfa83b9dd1bc1545fe3fa46008 (patch)
treeed5e6c37bc8784817676ea53070ce712b4b3476c
parentbceb528eb134bd4ad6e0cefc5b47db74d4de2d9b (diff)
downloadorg.eclipse.birt-0235155b7007fbcfa83b9dd1bc1545fe3fa46008.zip
org.eclipse.birt-0235155b7007fbcfa83b9dd1bc1545fe3fa46008.tar.gz
org.eclipse.birt-0235155b7007fbcfa83b9dd1bc1545fe3fa46008.tar.bz2
fix 44891, use alias as expression name when the alias is not null.
-rw-r--r--data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/dscache/CacheUtilFactory.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/dscache/CacheUtilFactory.java b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/dscache/CacheUtilFactory.java
index 8ee56c3..a51c383 100644
--- a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/dscache/CacheUtilFactory.java
+++ b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/dscache/CacheUtilFactory.java
@@ -120,7 +120,10 @@ class CacheUtilFactory
for ( int i = 0; i < rsClass.getFieldCount( ); i++ )
{
IBinding binding = new Binding( rsClass.getFieldName( i + 1 ) );
- binding.setExpression( new ScriptExpression( ExpressionUtil.createJSDataSetRowExpression( rsClass.getFieldName( i + 1 ) ) ) );
+ if ( rsClass.getFieldAlias( i + 1 ) != null )
+ binding.setExpression( new ScriptExpression( ExpressionUtil.createJSDataSetRowExpression( rsClass.getFieldAlias( i + 1 ) ) ) );
+ else
+ binding.setExpression( new ScriptExpression( ExpressionUtil.createJSDataSetRowExpression( rsClass.getFieldName( i + 1 ) ) ) );
result.add( binding );
}
return result;