sapmentors / cap-community

SAP CAP Community
MIT License
97 stars 26 forks source link

How to deal with virtual fields for Fiori draft v4 #58

Closed wattnu closed 3 years ago

wattnu commented 4 years ago

Hi Community/CAP team, It seems, I've found an issue with virtual fields in draft mode. I've reported this in https://answers.sap.com/questions/13019552/how-to-deal-with-virtual-fields-for-fiori-draft-v4.html, but got no response so far. Maybe someone can have a look? Thanks Klaus

wattnu commented 4 years ago

Closing this because it will be followed up by https://answers.sap.com/questions/13019552/how-to-deal-with-virtual-fields-for-fiori-draft-v4.html

gregorwolf commented 4 years ago

Let's keep it open and link this issue from the SAP Community Q&A.

sjvans commented 3 years ago

hi @gregorwolf

i just stumbled across this. should be resolved in cds^4, as virtual elements are filtered on db level.

best, sebastian

invokers-gdo commented 3 years ago

This issue seems to have returned since @sap/cds > 5.4.0. I have tested 5.4.0 and 5.4.3 and both cause a problem when trying to save/activate a draft entity with virtual/readonly fields using SQLite local testing. @sap/cds 5.3.0 is working fine.

sjvans commented 3 years ago

With cds^5.4, computed values are preserved during draft activate. See https://cap.cloud.sap/docs/releases/aug21#changes-in-node-js.