Open spring-projects-issues opened 9 years ago
daniel carter commented
Ok, just found a reference to the hateoas bug tracker in the comments of another ticket. Might help things if there was a link on the project page. http://projects.spring.io/spring-hateoas/
Posted https://github.com/spring-projects/spring-hateoas/issues/266
daniel carter opened DATAREST-412 and commented
This Issue relates to Traverson, which is part of spring-hateoas, as a client to spring-data-rest. Hateoas doesn't have JIRA project, so hopefully this is the correct place for tickets.
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.
Affects: 2.2.1 (Evans SR1)