zkzong opened a new issue #11072:
URL: https://github.com/apache/shardingsphere/issues/11072
## Bug Report
### Which version of ShardingSphere did you use?
4.1.0
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
When I use official example, I modify the code, doesn't use snowflake
algorithm. I set primary key by myself.
My code is like this:
```java
for (int i = 1; i <= 10; i++) {
Order order = new Order();
order.setOrderId(i);
order.setUserId(i);
order.setAddressId(i);
order.setStatus("INSERT_TEST");
orderMapper.insert(order);
OrderItem item = new OrderItem();
item.setOrderItemId(i);
item.setOrderId(order.getOrderId());
item.setUserId(i);
item.setStatus("INSERT_TEST");
orderItemMapper.insert(item);
result.add(order.getOrderId());
}
```
When I run this code, the result is:
t_order_0

t_order_1

t_order_item_0

t_order_item_1

The size of table `t_order` is not correct and `order_item_id` of table
`t_order_item` is not correct.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]