cocodroid opened a new issue #10680: URL: https://github.com/apache/shardingsphere/issues/10680
## Bug Report **For English only**, other languages will not accept. Before report a bug, make sure you have: - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues). - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview). Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will **close it**. Please answer these questions before submitting your issue. Thanks! ### Which version of ShardingSphere did you use? 5.0.0-RC1-SNAPSHOT ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-JDBC ### Expected behavior springboot-jdbc example project . The normal execution statement should be: SELECT org.apache.shardingsphere.example.core.jpa.service.ShadowUserServiceImpl#printData userRepository.selectAll() ### Actual behavior Actual SQL: shadow_ds ::: select shadowuser0_.user_id as user_id1_0_, shadowuser0_.pwd as pwd2_0_, shadowuser0_.shadow as shadow3_0_, shadowuser0_.user_name as user_nam4_0_ from t_shadow_user shadowuser0_ Exception in thread "main" org.springframework.orm.jpa.JpaSystemException: Null value was assigned to a property of primitive type setter of org.apache.shardingsphere.example.core.api.entity.ShadowUser.shadow; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of org.apache.shardingsphere.example.core.api.entity.ShadowUser.shadow ### Reason analyze (If you can) Since the shadow database type is bit(1), the corresponding Java data type is Boolean, Although the shadow is a logical field and does not store the actual data, it may be found to be null when querying. A Boolean is bound to give an error.It should be a Boolean. So the entity ShadowUserEntit defines the field shadow to be of type Boolean, not the base type Boolean. ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. ### Example codes for reproduce this issue (such as a github link). -- 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: [email protected]
