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/05/22 08:43:47 UTC

[GitHub] [shardingsphere] shooray commented on issue #5727: The int(or bigint) value is null, but jpa with shardingsphere-jdbc returns zero.

shooray commented on issue #5727:
URL: https://github.com/apache/shardingsphere/issues/5727#issuecomment-632575385


   Hi kimmking. I don't quite agree with you.
   First of all, the value of the field is NULL and 0 have different meanings. Secondly, defining the object type and basic type in the Entity class also has different meanings. JPA and some ORMs can correctly handle basic types and object types. As the underlying facilities of the sub-library and table, the original data should also be kept.
   Yesterday I suggest you to modify
   org.apache.shardingsphere.shardingjdbc.jdbc.core.resultset.ShardingResultSet.java
   public long getLong (final int columnIndex) throws SQLException;
   The return value of Long is indeed wrong.
   
   But can it be used first when processing data
   java.sql.ResultSet
   of
   Object getObject (String paramString);
   Method to receive data, if it is null, it returns null. If not null, then return the value of the basic type?


----------------------------------------------------------------
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