wanghaichao2195 commented on issue #5596:
URL: https://github.com/apache/shardingsphere/issues/5596#issuecomment-702524564
yaml config:
rules:
sharding:
default-table-strategy:
standard:
sharding-column: uid
precise-algorithm-class-name: xxxxxxxxxxxxx
tables:
user_info_A:
actual-data-nodes:
xxxx.user_info_A_$->{0..${db.sharding.table.maxnumber}}
user_info_B:
actual-data-nodes:
xxxx.user_info_B_$->{0..${db.sharding.table.maxnumber}}
```java
@Table(name = "user_info_A")
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class UserInfo implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column(name = "uid", nullable = false)
private String uid;
@Column(name = "out_uid", nullable = false)
private String outUid = "";
xxxxxxxxxxxxxxx
```
I can save(insert) or query just fine, but I can't update.
I just query out a row and change just one attribute, and save(update) will
throw "Can not update sharding key" Exception
----------------------------------------------------------------
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]