fixed issue with db problem on ip address listing

This commit is contained in:
Alex Huang 2010-12-29 12:13:22 -08:00
parent a10ce22f99
commit fe2fc93209
1 changed files with 1 additions and 1 deletions

View File

@ -1312,7 +1312,7 @@ public abstract class GenericDaoBase<T, ID extends Serializable> implements Gene
if (type == EnumType.STRING) {
pstmt.setString(j, value == null ? null : value.toString());
} else if (type == EnumType.ORDINAL) {
pstmt.setLong(j, value == null ? null : ((Ip)value).longValue());
pstmt.setLong(j, value == null ? null : (value instanceof Ip) ? ((Ip)value).longValue() : NetUtils.ip2Long((String)value));
}
} else {
pstmt.setObject(j, value);