Let's not run this MySQL atrocity unless absolutely necessary.
This commit is contained in:
@@ -765,8 +765,9 @@ 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.type.equalsIgnoreCase("timestamp") ||
|
||||
coldef.type.equalsIgnoreCase("datetime"))) {
|
||||
if (!coldef.nullable && coldef.defaultValue.length() == 0 &&
|
||||
(coldef.type.equalsIgnoreCase("timestamp") ||
|
||||
coldef.type.equalsIgnoreCase("datetime"))) {
|
||||
log.info("Assigning current time to " + fmarsh.getColumnName() + ".");
|
||||
ctx.invoke(new Modifier.Simple() {
|
||||
@Override protected String createQuery (DatabaseLiaison liaison) {
|
||||
|
||||
Reference in New Issue
Block a user