Issue 31162  —   DSP: Reconnecting unchanged records from Struct might be marked as modified

Status:   Solved in 10.2.01

Solution available in patch(es):      G103

Description:

 Summary:
 When reconnecting a disconnected record from a Struct that has been creaated by
 a DSP and has not been modified, it might be marked as modified if it includes
 fields with no value. This can occur when the disconnected record is marked as
 modified in the Struct (Tag u_status="mod").

 Environment:
 +Uniface: Version 9.6.06, i.e. MX05 (and higher)
 +Operating System: OS independent
 +Database: DBMS independent

 Symptoms:

 When reconnecting a disconnected record from a Struct that has been created by
 a DSP and has not been modified, it might be marked as modified if it includes
 fields with no value. This can occur when the disconnected record is marked as
 modified in the Struct (Tag u_status="mod"). As a result, a subsequent store
 will cause the related database occurrence to be updated (even though that
 should not be the case).

 Consider the following scenario:

 1. A record is loaded by a session service component from a database
    > One of the fields is empty (has no value)

 2. The data is transferred to a Struct using componentToStruct/reconnecttags

 3. The Struct is then loaded into a DSP using structToComponent

 4. Without changing the record the data is transferred back to
    the session service, using componentToStruct/reconnecttags again

 5. In the session service the data is loaded again using structToComponent

 6. A reconnect is done

 7. And next a store is executed

 => The unchanged record will be updated and written back to the database

 When using XML (xmlsave & xmlload) instead of Structs
 (componentToStruct/reconnecttags & structToComponent), the described
 problem does not occur (i.e. the record in the database is not updated).

 Please note that the above described problem will not occur when an explicit
 reconnect is performed in the form after loading the Struct. This will cause
 that the record will be marked as unmodified (Tag u_status="est") in the Struct
 (causing the reconnect not to merge the data of the Struct with the data from
 the database, but fetch the data from the database).

 Additional remark: a similar problem has been reported for Client-Server; the
 issue has been recognized as BUG 31013 and was resolved with the version 9.6.07
 patch X705 and the version 9.7.01 patch G101.

Workaround:

 Always make sure that a reconnect is executed after loading data from a Struct
 into a component (using structToComponent).

Notes: