IDEMPIERE-4243:when key columns has date column then save record make error ORA-01861: literal does not match format string

This commit is contained in:
hieplq 2020-04-13 14:56:04 +07:00 committed by Carlos Ruiz
parent ba380e114e
commit bb43c4edcd
1 changed files with 4 additions and 1 deletions

View File

@ -2382,7 +2382,10 @@ public class GridTable extends AbstractTableModel
if (columnName.endsWith ("_ID"))
multiRowWHERE.append (tableName).append(".").append(columnName)
.append ("=").append (value);
else
else if (value instanceof Timestamp) {
multiRowWHERE.append (tableName).append(".").append(columnName)
.append ("=").append (DB.TO_DATE((Timestamp)value, false));
}else
multiRowWHERE.append (tableName).append(".").append(columnName)
.append ("=").append (DB.TO_STRING(value.toString()));
}