db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1327933 - /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/general/fieldDefinition.vm
Date Thu, 19 Apr 2012 12:51:46 GMT
Author: tfischer
Date: Thu Apr 19 12:51:46 2012
New Revision: 1327933

URL: http://svn.apache.org/viewvc?rev=1327933&view=rev
Log:
TORQUE-15 Change comment on java field if we use the database default values for columns 

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/general/fieldDefinition.vm

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/general/fieldDefinition.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/general/fieldDefinition.vm?rev=1327933&r1=1327932&r2=1327933&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/general/fieldDefinition.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/general/fieldDefinition.vm
Thu Apr 19 12:51:46 2012
@@ -21,12 +21,30 @@
 ##
 ## This template generates the definition for a field (= member variable) of 
 ## a java class. It expects to be executed on a source element with the 
-## field attributes set (as defined in the JavaFieldAttributeName enum). 
+## field attributes set (as defined in the JavaFieldAttributeName enum).
+## It also considers the dueDatabaseDefaultValue flag for javadoc generation.
 ##
-#if ($description)
+#if ($useDatabaseDefaultValue != "true")
+  #if ($description)
     /** $description */
-#else
+  #else
     /** Defines the $field field. */
+  #end
+#else
+  #if ($description)
+    /** 
+      *$description
+  #else
+    /**
+     * Defines the $field field.
+  #end
+     * This field is not saved to the database if the object is new and
+     * the field's value is its java default value. This means that
+     * in this case, the database default value is used for the new 
+     * object.
+     * WARNING: The java value is _NOT_ updated to match the database value
+     * after saving.
+     */
 #end
 ${torqueGen.mergepoint("annotations")}##
 #if (!$fieldAccessModifier)



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message