Kbase P139224: MERGE-CHANGES merges same change more than once
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  29/12/2008 |
|
Status: Unverified
SYMPTOM(s):
MERGE-CHANGES merges same change more than once
FACT(s) (Environment):
ACCEPT-ROW-CHANGES is also used on the same after-image table
All Supported Operating Systems
OpenEdge 10.x
CAUSE:
ACCEPT-ROW-CHANGES() tells the AVM that changes to rows tracked in the before-table(s) have been processed and that the changed records should be accepted as the new origin ProDataSet version. All before-tables in the ProDataSet are emptied, and the pointers to those records in the after-table are removed so that the BEFORE-ROWID attribute of every record in the after-tables is the Unknown value (?) and the ROW-STATE of every record in the after-tables is set to ROW-UNMODIFIED.
MERGE-CHANGES does an ACCEPT-CHANGES or ACCEPT-ROW-CHANGES implicitly. Since ACCEPT-ROW-CHANGES has already been called explicitly in this case, MERGE-CHANGES does not recognize that the changes in the after-table have already been applied, and it applies them again.
In general, MERGE-CHANGES is a higher-level method that includes the work done by ACCEPT-CHANGES and REJECT-CHANGES. If application logic requires that ACCEPT-CHANGES, ACCEPT-ROW-CHANGES, REJECT-CHANGES, or REJECT-ROW-CHANGES be used in a specific way, take particular care before deciding to use MERGE-CHANGES as well to make sure that the same operations will not be performed twice.
FIX:
Remove the redundant ACCEPT-ROW-CHANGES from the application code.