zcqshine commented on issue #2137: batchSave IndexOutOfBoundsException
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2137#issuecomment-478889321
 
 
   sharding configuration:
   ```
   sharding.jdbc.config.props.sql.show = true
   #t_form_template_data 分表设置
   sharding.jdbc.config.sharding.tables.t_form_template_data.actual-data-nodes 
= ds.t_form_template_data_$->{0..40}
   
sharding.jdbc.config.sharding.tables.t_form_template_data.table-strategy.inline.sharding-column
 = project_id
   
sharding.jdbc.config.sharding.tables.t_form_template_data.table-strategy.inline.algorithm-expression
 = t_form_template_data_$->{project_id % 41}
   #t_form_template_struct 分表设置
   
sharding.jdbc.config.sharding.tables.t_form_template_struct.actual-data-nodes = 
ds.t_form_template_struct_$->{0..40}
   
sharding.jdbc.config.sharding.tables.t_form_template_struct.table-strategy.inline.sharding-column
 = project_id
   
sharding.jdbc.config.sharding.tables.t_form_template_struct.table-strategy.inline.algorithm-expression
 = t_form_template_struct_$->{project_id % 41}
   ```
   mybatis-plus configuration:
   ```
   mybatis-plus.global-config.db-config.db-type = postgre_sql
   mybatis-plus.mapper-locations = classpath:/mapper/*Mapper.xml
   mybatis-plus.type-aliases-package = 此处省略扫描的包名
   mybatis-plus.global-config.db-config.id-type = id_worker
   mybatis-plus.global-config.db-config.field-strategy = not_empty
   mybatis-plus.global-config.refresh = true
   mybatis-plus.configuration.cache-enabled = false
   mybatis-plus.configuration.log-impl = 
org.apache.ibatis.logging.stdout.StdOutImpl
   ```
   
   execute sql is:
   ```SQL
   INSERT INTO t_form_function_relation ( id, function_id, struct_id, 
template_id, update_user, create_user, create_time, update_time, del_flag, 
version ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
   ```
   the table `t_form_function_relation` is not sharding.
   if i use sharding-sphere 3.1.0 , the will be ok.
   
   Database is postgresql 10

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


With regards,
Apache Git Services

Reply via email to