Open dantheperson opened 10 years ago
Any comments / patches ?-- Was disappointed that the client library did not support this functionality. Seems like table stakes for Hypermedia consumption (and is the way Traverson works)
Will look into extending the library to support this functionality if it can be added cleanly ie continue()
When using Traverson, i can only retrieve the resource at the end of the traversal. It is often useful to retrieve the intermediate objects.
For instance i have CREDENTIALS, which are linked to an IDENTITY, which has a (main) CONTACT which has some ROLEs.
For a credential, i want to retrieve the identity and its contacts roles.
This gives me the contact roles, but there is no way to get at the identity.
I can retrieve both this way, but's it's ugly.
A few options 1) Traverson could be stateful, retrieving an object and remembering it to allow a subsequent follow to resume from that resource
2) Traverson could store everything for later retrieval
3) Traverson could optionally return some sort of intermediate object to hold state
All much clearner looking than
PS. It would be nice if spring-data-rest would return a single object from a query method whoose signature returns a single entity to avoid all the "$_embedded.credentials[0]._links.identity.href" stuff.