Branch session rollback failed and try again later xid = 127.0.0.1:8091:130679683661434880 branchId = 130679685964107776 The value specified for generated column 'aa' in table 'xx' is not allowed.
Ⅵ. Environment:
- JDK version : .8
- OS : centos 7
- Others: seata version 1.4.1
3条答案
按热度按时间jfewjypa1#
aa 是 xx表的虚拟字段
yxyvkwin2#
sql 表结构示例贴出来
jhdbpxl93#
sql 表结构示例贴出来
CREATE TABLE cw_cust (
ID bigint(20) NOT NULL COMMENT 'ID',
CUST_ID varchar(20) DEFAULT NULL COMMENT '客户代码',
CUST_NAME varchar(100) DEFAULT NULL COMMENT '客户名称',
BILL_TYPE char(2) DEFAULT NULL COMMENT '业务类型',
BILL_NO varchar(20) DEFAULT NULL COMMENT '业务编号',
CAPITAL_AMT decimal(18,6) DEFAULT '0.000000' COMMENT '金额1',
CREDIT_AMT decimal(18,6) DEFAULT '0.000000' COMMENT '金额2',
BALANCE_AMT decimal(18,6) GENERATED ALWAYS AS ((ifnull(CAPITAL_AMT,0) + ifnull(CREDIT_AMT,0))) STORED COMMENT '余额',
PRIMARY KEY (ID) USING BTREE,
KEY idx_fund_cust (CUST_NAME)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='余额表';