From 31b886aed26a7981c82677271bd34bd3c85c4c0a Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 25 Apr 2008 18:32:44 +0000 Subject: [PATCH] --- src/java/com/samskivert/jdbc/depot/DepotMarshaller.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/com/samskivert/jdbc/depot/DepotMarshaller.java b/src/java/com/samskivert/jdbc/depot/DepotMarshaller.java index 1395dd7..6fcf694 100644 --- a/src/java/com/samskivert/jdbc/depot/DepotMarshaller.java +++ b/src/java/com/samskivert/jdbc/depot/DepotMarshaller.java @@ -702,8 +702,8 @@ public class DepotMarshaller // 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.getType().equalsIgnoreCase("timestamp") || - coldef.getType().equalsIgnoreCase("datetime")) { + if (!coldef.isNullable() && (coldef.getType().equalsIgnoreCase("timestamp") || + coldef.getType().equalsIgnoreCase("datetime"))) { log.info("Assigning current time to " + fmarsh.getColumnName() + "."); ctx.invoke(new Modifier.Simple() { protected String createQuery (DatabaseLiaison liaison) {