Skip to Content
0

SAPUI5 - READ statement not triggered

Mar 14, 2017 at 12:47 PM

186

avatar image

Hi all!

i'm facing a little issue with my UI5 application.

A little premise: i'm developing the backend on SAP 731, and integrate the UI5 libreries in Angular 2 (ok, this part is up to my colleguees!) to develop a nice Angular App speaking with both SAP and a couple of other systems.

We choose the logic to read an entity and if exist update, otherwise create.


After some time, we noticed SAP is not aligned with the other systems and we found the following:

After deleting an entity, if i read it, create it again and read once more, the last read fails.

The POST payload, obviously is always the same (these calls are from a test page we created to cycle the operations and check the result).


Even more strange, if i put a break point on the GET method, SAP side, i see it's not triggered for the last GET.

It's a wanted behaviour i missed? Or i just found a bug?

To clean the field, we created a new model each single call (POST-DELETE-GET) we make and the test page is pure JS-HTML-UI5

1.png (40.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Srikanth KV Mar 14, 2017 at 09:13 PM
0

after submitting changes to DB ...can you refresh() the model and then perform read operation

Just a guess....if you are not performing refresh model then UI5 is getting the information from cache and hence no breakpoint is triggered for the last GET.(not sure if my statement is correct or not, experts in the forum can advise)

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Srikanth,

thanks for your answer but we instantiate a new model each call.

Anyway we put refresh before and after each call but situation don't change.

0

"After deleting an entity, if i read it, create it again and read once more, the last read fails."

Can you put some wait time before the last read operation, just a guess that after create operation DB is still updating may be taking few milliseconds and the last read request came in...

0

Tried without success: we put a wait of 30 second between a call and the next one.

0
Simone Milesi Mar 16, 2017 at 02:25 PM
0

Ok, we identified the problem into cache management on Gateway server side.

If we put some rubberish into the calling parameters, the server recognize it like a new calling and the read is succesful and the method "GET_ENTITY" is triggered, skipping the cache.

For now we manage this workaround but we really want to find a more correct solution.

Share
10 |10000 characters needed characters left characters exceeded