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
When I was debugging change tracking, I found that in the following modeling and annotation, certain special cases resulted in capturing the wrong objectID:
Because in modeling, Buildings entity has a name field, and the ObjectID annotation also needs to capture the name field of the final entity from goods.goods.goods.name. In fact, the two name fields represent different content.
When we set the value 'test buildings' to the name of the Buildings entity in our app, and Goods is empty, the ObjectID we expect is only: 'test buildings', because all the other values are empty. But in this case, because Buildings have a field called name, and path: 'goods.goods.goods.name' ends up with a field called name, the ObjectID will be: 'test buildings, test buildings'. You can see that we now have the wrong ObjectID.
Hello,
When I was debugging change tracking, I found that in the following modeling and annotation, certain special cases resulted in capturing the wrong objectID:
Because in modeling, Buildings entity has a name field, and the ObjectID annotation also needs to capture the name field of the final entity from goods.goods.goods.name. In fact, the two name fields represent different content.
When we set the value 'test buildings' to the name of the Buildings entity in our app, and Goods is empty, the ObjectID we expect is only: 'test buildings', because all the other values are empty. But in this case, because Buildings have a field called name, and path: 'goods.goods.goods.name' ends up with a field called name, the ObjectID will be: 'test buildings, test buildings'. You can see that we now have the wrong ObjectID.
And here's the problem:
https://github.com/cap-js/change-tracking/blob/main/lib/entity-helper.js#L99
This is my solution:
If you have time, please take a look at this scenario.
Best Regards,
Wenjun
The text was updated successfully, but these errors were encountered: