程序执行intert语句时报错如下
## Error updating database. Cause: com.kingbase8.util.KSQLException: ERROR: constraint 46641 is not a foreign key constraint
### The error may exist in org/activiti/db/mapping/entity/Resource.xml
### The error may involve org.activiti.engine.impl.persistence.entity.ResourceEntityImpl.insertResource-Inline
### The error occurred while setting parameters
### SQL: /**NoTenantId*/insert into ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_, GENERATED_) values (?, 1, ?, ?, ?, ?)
### Cause: com.kingbase8.util.KSQLException: ERROR: constraint 46641 is not a foreign key constraint
首先通过约束ID查找约束名称;
SELECT conname, contype, conkey, confkey, confrelid
FROM pg_constraint
WHERE oid = 46641 ;
然后通过约束ID查找约束类型;
SELECT pg_get_constraintdef(46641);
删除约束解决错误。
3124

被折叠的 条评论
为什么被折叠?



