db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ddwcyl (JIRA)" <j...@apache.org>
Subject [jira] Created: (DDLUTILS-260) getValueAsString do not work correctly with oracle number(1)
Date Wed, 02 Jun 2010 12:07:39 GMT
getValueAsString do not work correctly with oracle number(1)

                 Key: DDLUTILS-260
                 URL: https://issues.apache.org/jira/browse/DDLUTILS-260
             Project: DdlUtils
          Issue Type: Bug
          Components: Core - Oracle
    Affects Versions: 1.0
         Environment: oracle 9i
            Reporter: ddwcyl
            Assignee: Thomas Dudziak

i use ddlutil to get insertSql for some tables .when the column type is number(1),SqlBulder.getValueAsString
return's value is "ture",otherwise myvalue is "1",
it seems ddlutil think number(1) is bool. an other's issue is getValueAsString return's value
is '123' when my value is 123.
i try fixed it in Oracle8Builder override getValueAsString,the code is 
    protected String getValueAsString(Column column, Object value) {
    	String result;
        if (value == null)
            return "NULL";

    		//number(1) type
    		case Types.BIT:
    			 {result = "1";}
    		case Types.INTEGER:
    			result = escapeStringValue(value.toString());
    		case Types.NUMERIC:
    			result = escapeStringValue(value.toString());
    			result = super.getValueAsString(column, value);
    	return result;

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message