Author: doogie
Date: Sun May 30 22:06:58 2010
New Revision: 949607
URL:
http://svn.apache.org/viewvc?rev=949607&view=revLog:
Only output the alias if it is not the same as the default name.
Modified:
ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldDef.java
Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldDef.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldDef.java?rev=949607&r1=949606&r2=949607&view=diff==============================================================================
--- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldDef.java (original)
+++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldDef.java Sun May 30 22:06:58 2010
@@ -46,7 +46,9 @@ public final class FieldDef extends Atom
public StringBuilder appendTo(StringBuilder sb) {
value.appendTo(sb);
- sb.append(" AS ").append(alias);
+ if (!equalsHelper(value.getDefaultName(), alias)) {
+ sb.append(" AS ").append(alias);
+ }
return sb;
}
}