You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/01/09 06:48:15 UTC

[GitHub] [incubator-shardingsphere] zzeverglow removed a comment on issue #3852: shardingjdcb 4.0.0-rc2 cannot convert sqlserver timestamp field

zzeverglow removed a comment on issue #3852: shardingjdcb 4.0.0-rc2 cannot convert sqlserver timestamp field
URL: https://github.com/apache/incubator-shardingsphere/issues/3852#issuecomment-572416224
 
 
   > @zzeverglow , I create a test environment,
   > 
   > * SQLSERVER2012
   > * JDBC Driver version: 7.4.1.jre 8 & 7.2.2.jre8
   >   I create a table with timestamp field, and jpa's entity bean column is `java.sql.Timestamp`,
   > 
   > I test RC2 and RC3, They are OK!
   > 
   > Can you provide your table structure态entity bean and query sql?
   > 
   > It is best that you can provide a test project(remove company business code) and reappear this problem. Thanks.
   
   if (null != streamGetterArgs) {
               if (!streamGetterArgs.streamType.convertsFrom(typeInfo)) 
                   DataTypes.throwConversionError(typeInfo.getSSType().toString(), streamGetterArgs.streamType.toString());
           } else {
           if (!baseSSType.convertsTo(jdbcType) && !isNull) {
   //             if the baseSSType is Character or NCharacter and jdbcType is Longvarbinary,        
   //             does not throw type conversion error, which allows getObject() on Long Character types.
                if (encrypted) {
                    if (!Util.isBinaryType(jdbcType.getIntValue())) {
                    DataTypes.throwConversionError(baseSSType.toString(), jdbcType.toString()); 
                    }
                } else { 
                    DataTypes.throwConversionError(baseSSType.toString(), jdbcType.toString()); 
                }
           } 
                streamGetterArgs = InputStreamGetterArgs.getDefaultArgs();}
           }
   This code in sqlserver.jdbc.ServerDTVImpl.getValue  cause the excpetion.
   baseSSType is "timestamp".jdbcType is "BLOB"

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services