Skip to content

Commit

Permalink
null substitute only for text fields
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Oct 1, 2007
1 parent 23befa5 commit 5f2322a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ private Object[] filterValues(Column[] metaData, String[] values) {

if (column != null) {
int type = column.getTypeCode();
if (column.isRequired()
&& (value == null || (dbDialect.isEmptyStringNulled() && value.equals("")))) {
// TODO: should there be defaults for date and numeric types?
if ((value == null || (dbDialect.isEmptyStringNulled() && value.equals("")))
&& column.isRequired() && column.isOfTextType()) {
objectValue = REQUIRED_FIELD_NULL_SUBSTITUTE;
} else if (value != null && type == Types.DATE) {
objectValue = getDate(value, DATE_PATTERNS);
Expand Down

0 comments on commit 5f2322a

Please sign in to comment.