[hibernate-commits] Hibernate SVN: r10995 - branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Dec 15 02:43:13 EST 2006


Author: max.andersen at jboss.com
Date: 2006-12-15 02:43:10 -0500 (Fri, 15 Dec 2006)
New Revision: 10995

Modified:
   branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo/BasicPOJOClass.java
Log:
align annotation column defaults gen with spec

Modified: branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo/BasicPOJOClass.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo/BasicPOJOClass.java	2006-12-14 19:10:37 UTC (rev 10994)
+++ branches/Branch_3_2/HibernateExt/tools/src/java/org/hibernate/tool/hbm2x/pojo/BasicPOJOClass.java	2006-12-15 07:43:10 UTC (rev 10995)
@@ -415,13 +415,13 @@
 			
 			appendCommonColumnInfo( annotations, column, insertable, updatable );
 			
-			if (column.getPrecision() != Column.DEFAULT_PRECISION) {
+			if (column.getPrecision() != 0 /*Column.DEFAULT_PRECISION*/) { // the default is actually 0 in spec
 				annotations.append( ", precision=" ).append( column.getPrecision() );
 			}
-			if (column.getScale() != Column.DEFAULT_SCALE) { // default is actually 0 in spec
+			if (column.getScale() != 0 /*Column.DEFAULT_SCALE*/) { // default is actually 0 in spec
 				annotations.append( ", scale=" ).append( column.getScale() );
 			}
-			else if (column.getLength() != Column.DEFAULT_LENGTH){ // the default is actually 0 in spec
+			else if (column.getLength() != 255 /*Column.DEFAULT_LENGTH*/){ 
 				annotations.append( ", length=" ).append( column.getLength() );
 			}
 			




More information about the hibernate-commits mailing list