Closed YanaHoncharova closed 5 years ago
Can you provide a sample code to reproduce the issue (With server response example)?
There are no force
option for fetchArray
because there are no cache on fetchArray
.
For example first server response is something like:
value: 1
_embedded:
'list':
0: {
name: 'FirstName';
_embedded:
Done: {
count: 1;
_links....
}
}
Second one:
value: 1
_embedded:
'list':
0: {
name: 'FirstName';
_embedded:
Testing: {
count: 1;
_links....
}
}
And here is example how I fetch it every time:
this.halClient.fetchArray(some.uri.uri, OurModel)
.then(data => {})
And in the data
after second response I get in props both: Done and Testing. As if response was:
value: 1
_embedded:
'list':
0: {
name: 'FirstName';
_embedded:
Done: {
count: 1;
_links....
}
Testing: {
count: 1;
_links....
}
}
resetCache() before fetchArray
helps.
Same issue... I fetchArray
the list of Entries, then I update a single Entry, then refresh the list by fetching the array again.
NOTE: Each Entry has an unique list of links available, depends on it's state.
As a result - after the Entry was updated and the new array was fetched again, the corresponding Entry contains the links (which it must not has anymore) Despite the fact that the server output does not send them
@EvgeniyReznichenko @YanaHoncharova can you try with 0.5.0 version.
I must be fix
I have tried with 0.5.0 version and everything works fine. Thank you.
But also I've faced another thing:
As I understand, on fetching child resource parent is reseted. And than created with key-value pairs from new server response. But in embedded object there are less parent properties, than we recieved previously from fetching parent. And as we use parent resource for our ui directly, the problem occure.
Could you suggest something?
@YanaHoncharova I have create a new issue #40
Hello,
It would be useful to add possibility to force data updating when using HalRestClient fetchArray method. (Currently there is a force param in HalResouce fetch method that do the trick.)
I've faced with an issue related to this updating. When I retrieve data using HalRestClient fetchArray method, I expect to see new response each time, but instead I recieve partly updated one with cached properties from previous call.