svn commit: r949607 - /ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldDef.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r949607 - /ofbiz/trunk/framework/sql/src/org/ofbiz/sql/FieldDef.java

doogie-3
Author: doogie
Date: Sun May 30 22:06:58 2010
New Revision: 949607

URL: http://svn.apache.org/viewvc?rev=949607&view=rev
Log:
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;
     }
 }