You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Support capturing the Object ID and the value when there is a nested duplicated association name. (#58)
1. fix the issue that no value is returned for 'parent.parent.x' when
building hierachical entities with CAP compositions.
2. when the app creates both parent and child nodes, the parent node
does not exist in the data table, so the corresponding data needs to be
obtained from the draft table.
3. when updating a parent node and deleting a child node, the
corresponding node will disappear from the draft table. Therefore, it is
necessary to get the data from the data table.
This PR includes fixes for all three of these situations.
---------
Co-authored-by: I560824 <[email protected]>
constfromObjId=awaitgetObjectId(a.target,semkeys,{curObjFromDbQuery: from||undefined})// Note: ... || undefined is important for subsequent object destructuring with defaults
114
+
constfromObjId=awaitgetObjectId(reqData,a.target,semkeys,{curObjFromDbQuery: from||undefined})// Note: ... || undefined is important for subsequent object destructuring with defaults
115
115
if(fromObjId)change.valueChangedFrom=fromObjId
116
116
117
-
consttoObjId=awaitgetObjectId(a.target,semkeys,{curObjFromDbQuery: to||undefined})// Note: ... || undefined is important for subsequent object destructuring with defaults
117
+
consttoObjId=awaitgetObjectId(reqData,a.target,semkeys,{curObjFromDbQuery: to||undefined})// Note: ... || undefined is important for subsequent object destructuring with defaults
118
118
if(toObjId)change.valueChangedTo=toObjId
119
119
120
120
constisVLvA=a["@Common.ValueList.viaAssociation"]
@@ -219,7 +219,7 @@ const _getObjectIdByPath = async function (
// Peer association and composition are distinguished by the value of isComposition.
93
+
if(isComposition){
94
+
// This function can recursively retrieve the desired information from reqData without having to read it from db.
95
+
_db_data=_getCompositionObjFromReq(reqData,IDval)
96
+
// When multiple layers of child nodes are deleted at the same time, the deep layer of child nodes will lose the information of the upper nodes, so data needs to be extracted from the db.
0 commit comments