-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong changes in the change history #138
Comments
@Sv7enNowitzki is this related to the DATE-Issues with the DB driver that we have? |
Regarding the third issue mentioned in the ticket, I suspect it might be the case, as it seems that C4B has started using the new driver Best Regards, |
We are watching different behavior of the change history also in other apps. I have an impression, evrything due to upgrade. For example in two apps no any "create" changes are shown at all, only "update" - the entities were created via wrapper service and updated also via wrapper service, but within job execution. Earlier (before upgrade, in the previous release) we had issues with missing change entries for job execution. Then they were solved. Now it is somehow vice versa. Kind regards, |
Hello colleagues, I found an additional issue. In some apps "create" changes are not shown. I found even the reason. For example, for the "Wallets" app: Change history is being written on "before CREATE" event. Wallet is created per action; INSERT is executed with ID = null). However it would be rather a workaroud because an entity can be created without ID and ID is being generated during INSERT. The questions are:
Kind regards, |
P.S. As I also supposed, before upgrade ID was filled on "before CREATE" event. Could you please test the same? |
@Sv7enNowitzki , @nkaputnik , Colleagues! Could you please check? |
Hello Elena, Best, |
Hi Nick, The only workaround I found was to generate an ID and fill it before inserting an entry. Kind regards, |
Hello colleagues!
We are working on the project https://github.tools.sap/erp4sme/crypto-for-business.
The issues that we have are referring to the change tracking; however the difference to be reflected in the change history is being estimated in the utilities of node_modules/@sap/cds/libx/_runtime/common/utils.
We have an app:
App annotation app\payment\downstreamPaymentProcessors\annotations.cds
Entity CDS db\payment\paymentRails\DownstreamPaymentProcessors.cds
UI service CDS srv\payment\paymentRails\ui-service-downstreamPaymentProcessors.cds
UI service provider srv\payment\paymentRails\ui-service-downstreamPaymentProcessors.ts
Entity DownstreamPaymentProcessors has compositions to two views:
entity DownstreamPaymentProcessors : cuid, managed {
@changelog
@title : '{i18n>Name}'
name : String;
}
entity DownstreamPaymentProcessorNetworkMappings as
select from GeneralMappings {
*,
Network : Association to one Networks on Network.ID = sourceObjectId,
}
where
contextEntityType.code = 'PAYMENT_PROCESSOR'
and sourceEntityType.code = 'NETWORK';
entity DownstreamPaymentProcessorCryptocurrencyMappings as
select from GeneralMappings {
*,
Cryptocurrency : Association to one Cryptocurrencies on Cryptocurrency.ID = sourceObjectId,
}
where
contextEntityType.code = 'PAYMENT_PROCESSOR'
and sourceEntityType.code = 'CRYPTOCURRENCY';
These Mappings entities are also annotated for change tracking.
Although UI service entity is declared as draft enabled, all DB operations during SAVE event are fulfilled explicitly via wrapper service (srv\payment\wrapper\wrapper-service.cds).
Whenever a UI change is done on mappings (for example a new mapping is added) then the mappings which have existed so far are shown as if they were deleted (although they are not):
I saw:
In node_modules/@sap/cds/libx/_runtime/common/utils/comparejason.js the function _addToBeDeletedEntriesToResult set _op: 'delete' on the mappings.
Then I saw that unlike the previous solution node_modules/@sap/cds/libx/_runtime/common/utils/comparejason.js did not get any old value to compare with the new one. Then mappings were marked with _op: 'create' – as if they were new.
For the entity DownstreamPaymentProcessor some fields are shown as updated in every change log, although they were not changed:
Could you please help? We think that the issues began after upgrading the CDS version to CDS8 (we have 8.4.2 now).
Kind regards,
Elena Gurevitch
The text was updated successfully, but these errors were encountered: