cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CAP; UPDATE method doesn't trigger READ hanlder after function _readAfterWrite

alicegavanelli
Participant
4,446

Hallo Experts, I have an issue about READ handler.

I have an Entity with calculation fields. In order to set these fields, I have implemented READ handler.

Triggering a GET request everythings is ok: fields are calculated.

Triggering a PUT request in order to modify entity’s data, fields are empty.


CAP after update runs _readAfterWrite function; this function re-loads entity’s data from DB correctly. After this function, CAP should trigger my READ handler, but it doesn’t.

As a result my calculated fields are empty.

Any ideas on how to solve this problem?

Best regards.

Alice

View Entire Topic
alicegavanelli
Participant

With a PUT call, CAP triggers these events in that orders:

  1. srv.ON (event UPDATE)
  2. srv.AFTER (event UPDATE)
  3. _readAfterWrite

Never call after-READ or on-READ.