BF: [2836386] Replication import fails on Integer values
https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2836386&group_id=176962
This commit is contained in:
parent
7ea9f86771
commit
fcba5f2548
|
@ -638,6 +638,16 @@ public class ImportHelper {
|
|||
BigDecimal value = new BigDecimal((String)values[i]);
|
||||
pstmt.setBigDecimal(i+1, value.setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
}
|
||||
else if(col.getAD_Reference_ID() == DisplayType.Integer
|
||||
|| col.getAD_Reference_ID() == DisplayType.ID
|
||||
|| col.getAD_Reference_ID() == DisplayType.TableDir
|
||||
|| col.getAD_Reference_ID() == DisplayType.Table)
|
||||
{
|
||||
String stringValue = (String)values[i];
|
||||
int value = Integer.parseInt(stringValue);
|
||||
pstmt.setInt(i+1, value);
|
||||
log.info("pstmt.setInt["+(i+1)+"] = [" + value +"]");
|
||||
}
|
||||
else
|
||||
{
|
||||
pstmt.setObject(i+1, values[i]);
|
||||
|
|
Loading…
Reference in New Issue