Subject | IBOTable EditSQL not using primary key in 5.9.5 |
---|---|
Author | Guilherme Luiz Lanius |
Post date | 2017-09-21T14:36:17Z |
Hello,
I'm upgrading from 5.7.3 to 5.9.5 but I just found a problem with EDISQL
on IBOTable, it's not using the primary key when updating.
Primary Key is SAC_CF_LOJA, SAC_CF_DT_EMIS, SAC_CF_CONTROLE
5.7.3 SQL
UPDATE SAC_CF
SET SAC_CF.SAC_CF_LOJA = ? /* SAC_CF.SAC_CF_LOJA */
, SAC_CF.SAC_CF_DT_EMIS = ? /* SAC_CF.SAC_CF_DT_EMIS */
, SAC_CF.SAC_CF_CONTROLE = ? /* SAC_CF.SAC_CF_CONTROLE */
, SAC_CF.SAC_CF_NRO_CUPOM = ? /* SAC_CF.SAC_CF_NRO_CUPOM */
, SAC_CF.SAC_CF_CAIXA = ? /* SAC_CF.SAC_CF_CAIXA */
WHERE SAC_CF.SAC_CF_LOJA = ? /* OLD.SAC_CF_LOJA */
AND SAC_CF.SAC_CF_DT_EMIS = ? /* OLD.SAC_CF_DT_EMIS */
AND SAC_CF.SAC_CF_CONTROLE = ? /* OLD.SAC_CF_CONTROLE */
PLAN (SAC_CF INDEX (SAC_CF_PRIMARY))
5.9.5 SQL
/* IBO System EditSQL with UpdateMode umAllWhereKey */
UPDATE SAC_CF
SET SAC_CF.SAC_CF_LOJA = ?/* NEW.SAC_CF.SAC_CF_LOJA */
, SAC_CF.SAC_CF_DT_EMIS = ?/* NEW.SAC_CF.SAC_CF_DT_EMIS */
, SAC_CF.SAC_CF_CONTROLE = ?/* NEW.SAC_CF.SAC_CF_CONTROLE */
, SAC_CF.SAC_CF_NRO_CUPOM = ?/* NEW.SAC_CF.SAC_CF_NRO_CUPOM */
, SAC_CF.SAC_CF_CAIXA = ?/* NEW.SAC_CF.SAC_CF_CAIXA */
WHERE SAC_CF.SAC_CF_DT_EMIS = ?/* OLD.SAC_CF.SAC_CF_DT_EMIS */
AND SAC_CF.SAC_CF_CONTROLE = ?/* OLD.SAC_CF.SAC_CF_CONTROLE */
RETURNING SAC_CF_LOJA
, SAC_CF_DT_EMIS
, SAC_CF_CONTROLE
, SAC_CF_NRO_CUPOM
, SAC_CF_CAIXA
PLAN (SAC_CF NATURAL)
I'm upgrading from 5.7.3 to 5.9.5 but I just found a problem with EDISQL
on IBOTable, it's not using the primary key when updating.
Primary Key is SAC_CF_LOJA, SAC_CF_DT_EMIS, SAC_CF_CONTROLE
5.7.3 SQL
UPDATE SAC_CF
SET SAC_CF.SAC_CF_LOJA = ? /* SAC_CF.SAC_CF_LOJA */
, SAC_CF.SAC_CF_DT_EMIS = ? /* SAC_CF.SAC_CF_DT_EMIS */
, SAC_CF.SAC_CF_CONTROLE = ? /* SAC_CF.SAC_CF_CONTROLE */
, SAC_CF.SAC_CF_NRO_CUPOM = ? /* SAC_CF.SAC_CF_NRO_CUPOM */
, SAC_CF.SAC_CF_CAIXA = ? /* SAC_CF.SAC_CF_CAIXA */
WHERE SAC_CF.SAC_CF_LOJA = ? /* OLD.SAC_CF_LOJA */
AND SAC_CF.SAC_CF_DT_EMIS = ? /* OLD.SAC_CF_DT_EMIS */
AND SAC_CF.SAC_CF_CONTROLE = ? /* OLD.SAC_CF_CONTROLE */
PLAN (SAC_CF INDEX (SAC_CF_PRIMARY))
5.9.5 SQL
/* IBO System EditSQL with UpdateMode umAllWhereKey */
UPDATE SAC_CF
SET SAC_CF.SAC_CF_LOJA = ?/* NEW.SAC_CF.SAC_CF_LOJA */
, SAC_CF.SAC_CF_DT_EMIS = ?/* NEW.SAC_CF.SAC_CF_DT_EMIS */
, SAC_CF.SAC_CF_CONTROLE = ?/* NEW.SAC_CF.SAC_CF_CONTROLE */
, SAC_CF.SAC_CF_NRO_CUPOM = ?/* NEW.SAC_CF.SAC_CF_NRO_CUPOM */
, SAC_CF.SAC_CF_CAIXA = ?/* NEW.SAC_CF.SAC_CF_CAIXA */
WHERE SAC_CF.SAC_CF_DT_EMIS = ?/* OLD.SAC_CF.SAC_CF_DT_EMIS */
AND SAC_CF.SAC_CF_CONTROLE = ?/* OLD.SAC_CF.SAC_CF_CONTROLE */
RETURNING SAC_CF_LOJA
, SAC_CF_DT_EMIS
, SAC_CF_CONTROLE
, SAC_CF_NRO_CUPOM
, SAC_CF_CAIXA
PLAN (SAC_CF NATURAL)