Closed zcqshine closed 5 years ago
@zcqshine Can you provide your configuration of shardingsphere and your executed SQLs
Hi @zcqshine, I can't reproduce your problem with sharding-jdbc-spring-boot-starter 4.0.0-RC1-SNAPSHOT
and mybatis-spring-boot-starter 1.3.2
.
Would you mind provide a example code in your GitHub which can reproduce this problem?
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:
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
Hi @zcqshine, what's your database type, if oracle
or postgre
, the problem has fixed, please pull newest code and retry.
databse is postgre
version is 10.x
Let me try
Hi @zcqshine, any new progress?
Hi @zcqshine, any new progress?
sorry, i have no time to retry in these day. I will be tell you after get a result
Hi @zcqshine, any new progress?
sorry, i have no time to retry in these day. I will be tell you after get a result
No problem, but it is best to reply within 7 days, otherwise the issue may be closed.
Hi @zcqshine, any new progress?
sorry, i have no time to retry in these day. I will be tell you after get a result
No problem, but it is best to reply within 7 days, otherwise the issue may be closed.
4.0.0-rc2
is ok
Bug Report
version:
4.0.0-RC1-RELEASE
4.0.0.RC1-SNAPSHOT
myBatisPlus 3.1.0
batchInsert will throwable IndexOutOfBoundsException: Index:0, Size 0err msg:
before insert the data, I have checked the
ArrayList
is empty or is null