Aii, ColumnDefinition.defaultValue is null when it's unset, unlike the annotation.

This commit is contained in:
Par Winzell
2009-09-29 20:10:07 +00:00
parent d3e10710d2
commit 9c0c3be37b
@@ -765,7 +765,7 @@ public class DepotMarshaller<T extends PersistentRecord>
// TIMESTAMP columns a value of "0000-00-00 00:00:00" regardless of whether we
// explicitly provide a "DEFAULT" value for the column or not, and DATETIME columns
// cannot accept CURRENT_TIME or NOW() defaults at all.
if (!coldef.nullable && coldef.defaultValue.length() == 0 &&
if (!coldef.nullable && coldef.defaultValue == null &&
(coldef.type.equalsIgnoreCase("timestamp") ||
coldef.type.equalsIgnoreCase("datetime"))) {
log.info("Assigning current time to " + fmarsh.getColumnName() + ".");