zzeverglow commented on issue #3852: shardingjdcb 4.0.0-rc2 cannot convert 
sqlserver timestamp field
URL: 
https://github.com/apache/incubator-shardingsphere/issues/3852#issuecomment-572412595
 
 
   Its like this.``
   
   > @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.
   
   
   The field type in the sqlserver table  is 'timestamp', not 'datetime'.
   My code is like this. The code run successfully only when i use 'byte[]'  
and the shardingjdbc version is rc1. 'java.sql .Timestamp' cant run with any 
shardingjdbc version in my project.
   
   @Entity
   @Table(name = "xxx")
   public class DemoPo {
   @Id
   @Column("id")
   private Integer id;
   
   @Colum(name = "aaa")
   private byte[] aaa;
   }
   
   public interface DemoRespository extends JpaRepository<DemoPo, Integer> {
   }
   
   public class DemoService{
   DemoRepository demoRepository;
   public DemoPo get(int id) {
   demoRepository.findById(id);
   }
   }
   
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to