SmartClient Version: v10.0p_2015-08-06/Enterprise Deployment (built 2015-08-06)
Hello, I have an update operation with allowMultiUpdate=true, which in some cases affects no rows.
The DataSource has the audit feature enabled, and it is inserting always one record, when multiple records are updated, and even if no update is actually performed:
Also, on the same table, I'm doing multiple inserts with a single dsRequest.execute(), like this:
and I've noticed that only one record is inserted in the audit table.
Are those ways of inserting/updating multiple records supported by the audit feature, or I have to make a dsRequest.execute for each record?
Hello, I have an update operation with allowMultiUpdate=true, which in some cases affects no rows.
The DataSource has the audit feature enabled, and it is inserting always one record, when multiple records are updated, and even if no update is actually performed:
Code:
2015-08-06 16:54:17,476 INFO SQLDriver [builtinApplication.creaLotto] Executing SQL update on 'dbJpcEP': UPDATE DBSALES.JF_MOVIMENTI SET EXPORTED_TS=TO_DATE('2015-08-06 16:54:17','YYYY-MM-DD HH24:MI:SS') WHERE ((JF_MOVIMENTI.PAYMENT_DATE >= TO_DATE('2015-07-01 00:00:00','YYYY-MM-DD HH24:MI:SS') AND JF_MOVIMENTI.PAYMENT_DATE <= TO_DATE('2015-07-31 00:00:00','YYYY-MM-DD HH24:MI:SS') AND JF_MOVIMENTI.PAYMENT_DATE IS NOT NULL) AND (JF_MOVIMENTI.EXPORTED_TS IS NULL) AND (JF_MOVIMENTI.FL_SCART = 'F' AND JF_MOVIMENTI.FL_SCART IS NOT NULL)) 2015-08-06 16:54:17,480 WARN SQLDataSource [builtinApplication.creaLotto] update operation affected no rows 2015-08-06 16:54:17,481 DEBUG AuditDSGenerator [builtinApplication.creaLotto] AUDIT_JF_MOVIMENTI is an audit DataSource, processing 2015-08-06 16:54:17,481 DEBUG PoolableDataSourceFactory [builtinApplication.creaLotto] Created DataSource 5220 of type 'JF_MOVIMENTI' and assigned it to thread http-bio-8444-exec-9 2015-08-06 16:54:17,482 DEBUG PoolableDataSourceFactory [builtinApplication.creaLotto] Created DataSource 5221 of type 'AUDIT_JF_MOVIMENTI' and assigned it to thread http-bio-8444-exec-9 2015-08-06 16:54:17,482 DEBUG PoolableDataSourceFactory [builtinApplication.creaLotto] Created DataSource 5221 of type 'AUDIT_JF_MOVIMENTI' and assigned it to thread http-bio-8444-exec-9 2015-08-06 16:54:17,482 WARN DataSource [builtinApplication.creaLotto] When saving the audit record, getDataMap() returned null for DataSource JF_MOVIMENTI 2015-08-06 16:54:17,482 INFO SQLDataSource [builtinApplication.creaLotto, builtinApplication.null] Performing add operation with criteria: {AUDIT_MODIFIER:"cbosticco",AUDIT_OPERATIONTYPE:"update",AUDIT_CHANGETIME:new Date(1438872857482)} values: {AUDIT_MODIFIER:"cbosticco",AUDIT_OPERATIONTYPE:"update",AUDIT_CHANGETIME:new Date(1438872857482)} 2015-08-06 16:54:17,483 DEBUG SQLValuesClause [builtinApplication.creaLotto, builtinApplication.null] Sequences: {ID_REC=SEQUENCE_ID_REC, AUDIT_REVISION=AUDIT_JF_MOVIM_AUDIT_REVISION} 2015-08-06 16:54:17,483 DEBUG SQLDriver [builtinApplication.creaLotto, builtinApplication.null] About to execute SQL update in 'dbJpcEP' using connection'1186605796' 2015-08-06 16:54:17,483 INFO SQLDriver [builtinApplication.creaLotto, builtinApplication.null] Executing SQL update on 'dbJpcEP': INSERT INTO DBSALES.AUDIT_JF_MOVIMENTI (AUDIT_CHANGETIME, AUDIT_MODIFIER, AUDIT_OPERATIONTYPE, ID_REC, AUDIT_REVISION) VALUES (TO_DATE('2015-08-06 16:54:17','YYYY-MM-DD HH24:MI:SS'), 'cbosticco', 'update', DBSALES.SEQUENCE_ID_REC.NextVal, DBSALES.AUDIT_JF_MOVIM_AUDIT_REVISION.NextVal)
Also, on the same table, I'm doing multiple inserts with a single dsRequest.execute(), like this:
Code:
List<Map> records = ...; .... DSRequest addRecords = new DSRequest("JF_MOVIMENTI", DataSource.OP_ADD, rpcManager); addRecords.setValues(records); dsResponses.add(addRecords.execute());
Are those ways of inserting/updating multiple records supported by the audit feature, or I have to make a dsRequest.execute for each record?
Comment