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 2022/07/20 10:16:25 UTC

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

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

   > 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?
   
   hi,do you fix the problem now? We are facing the same problem.


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org