You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This resource has the included resource A with just the attributes data
Then I fetch-ed the A resources. As result I obtain the list of resources and each of them has the meta data
Debugging, I discovered that the Resource's constructor tries to get itself from caching.
The problem is that in the cache there's the included resource without the meta data (the one obtained within the main resource).
So, what's the purpose of the cache in the constructor of the Resource object?
Maybe the Resource.getUidString() method should be improved.
It should calculate the Uid string using all the fields allowed by the specification in the resource object (attributes, id, type, meta, links etc.)
The text was updated successfully, but these errors were encountered:
The goal is to achieve some level of consistency between resources.
Suppose you have two resources, photos and articles. Suppose you have a photo resource, then you fetch it's article and then pull down all of the photos in that article, you'll now have several photos and one article. You'll also have two instances of the same photo (the one you started with, and the one you got along with all the others from the article). The resourceCache is there to ensure in this scenario you get the same object references. If you have two different parts of your application that are looking at the same resource (by id), then they'll both be sharing the same model, so if one part of the application updates the resource the other part will also see the changes.
I fell in this issue:
Debugging, I discovered that the Resource's constructor tries to get itself from caching.
The problem is that in the cache there's the included resource without the meta data (the one obtained within the main resource).
So, what's the purpose of the cache in the constructor of the Resource object?
Maybe the Resource.getUidString() method should be improved.
It should calculate the Uid string using all the fields allowed by the specification in the resource object (attributes, id, type, meta, links etc.)
The text was updated successfully, but these errors were encountered: