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: [email protected]
For additional commands, e-mail: [email protected]