我有一个mysql表,QuotationPrt。我想创建以下触发器
private KeyInfo getKeyInfo(Credential c, String keyNameValue) {
KeyName keyName = new KeyNameBuilder().buildObject();
keyName.setValue(keyNameValue);
EncryptionConfiguration secConfiguration = SecurityConfigurationSupport.getGlobalEncryptionConfiguration();
NamedKeyInfoGeneratorManager namedKeyInfoGeneratorManager = secConfiguration.getDataKeyInfoGeneratorManager();
KeyInfoGeneratorManager keyInfoGeneratorManager = namedKeyInfoGeneratorManager.getDefaultManager();
KeyInfoGeneratorFactory keyInfoGeneratorFactory = keyInfoGeneratorManager.getFactory(credential);
KeyInfoGenerator keyInfoGenerator = keyInfoGeneratorFactory.newInstance();
KeyInfo keyInfo = keyInfoGenerator.generate(credential);
keyInfo.getKeyNames().add(keyName);
keyInfo.getX509Datas().clear();
return keyInfo;
}
这应该更新quotationprt的TOTAL列。但是当我尝试更新quotationprt表中的数据时,它会出错并且数据不会更新。在更新数据并尝试更新同一个表后,我可能会写入触发器。
那么有什么方法可以购买我可以更新TOTAL列吗?