Issue 31013 — Reconnecting unchanged records from Struct might be marked as modified
Status: Solved in 10.2.01
Solution available in patch(es): X705 G101
Description:
Summary: Uniface: When reconnecting a disconnected record from a Struct that has not been modified then 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 (and higher) - MX05 +Operating System: OS independent +Database: DBMS independent Symptoms: When reconnecting a disconnected record from a Struct that has not been modified then 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 that the related database occurrence is updated (even though that should not be the case). Consider the following scenario: 1. A record is loaded by (e.g.) 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 form 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).
Workaround:
Always make sure that a reconnect is executed after loading data from a Struct into a component (using structToComponent).
Notes: