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 2019/09/12 09:58:26 UTC

[GitHub] [incubator-shardingsphere] harry-lianghairui opened a new issue #3029: 分片键不传的时候找不到表

harry-lianghairui opened a new issue #3029: 分片键不传的时候找不到表
URL: https://github.com/apache/incubator-shardingsphere/issues/3029
 
 
              
   表user_buy_${0..15} 16张表, 分片键为uid, 当uid不传的时候
    UserBuy db = new UserBuy();
    db.setBuyOrderId(4902l);
    db.setUid(11587537l); //传uid没有问题, uid不传的时候找不到表
   List<UserBuy> userBuys = userBuyDao.findList(db);
   
   com.duowan.udb.exception.DataAccessException: get SQLException error  
   --- The error occurred while applying a parameter map.  
   --- Check the UserBuy.findList-InlineParameterMap.  
   --- Check the statement (query failed).  
   --- Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'hq_goods.user_buy' doesn't exist
   
   版本:·
   		<dependency>
   			<groupId>org.apache.shardingsphere</groupId>
   			<artifactId>sharding-jdbc-spring-namespace</artifactId>
   			<version>4.0.0-RC1</version>
   		</dependency>
   
   使用以前的老版本的时候没有问题
   		<dependency>
   			<groupId>com.dangdang</groupId>  
   	        <artifactId>sharding-jdbc-core</artifactId>  
           	<version>1.4.1</version>  
   		    </dependency>  
   	    <dependency>  
   	        <groupId>com.dangdang</groupId>  
   		        <artifactId>sharding-jdbc-config-spring</artifactId>  
   		        <version>1.4.1</version>  
   		    </dependency>  
   	     <dependency>  
   		        <groupId>com.dangdang</groupId>  
   		        <artifactId>sharding-jdbc-config-common</artifactId>  
   		        <version>1.4.1</version>  
   	      </dependency>
   

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