mycat中分片表中的分片字段是不能更新的,而Jpa(底层hibernate)默认是更新全字段。因此会产生冲突,报错。
@Column(updatable=false) public int getAge() { return age; }
<property name="age" update="false"></property>
主要是把实体不须要更新字段,设置 update 属性为 falsejava