New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle resource links of resources inlined using @Projection [DATAREST-302] #681
Comments
Szymon Stasik commented I guess natural solution would be to include _links within inlined "customer" property. Also another thing is coming to my mind - using eg. propertyName.projection parameter it might be possible to define nested inlining |
Ruslan Stelmachenko commented I think Szymon Stasik is right. But we lose not only the reference to customer.address but also the reference to self. It's actually sometimes very important to know which customer it is. For example we want to show the html table in which everty row is customer name and every cell is order.
Now how we can understand from JavaScript what order whose? We can't connect loaded orders with their customers somehow. It is real showstopper in my use case and makes me use DB ID's instead of hyper-id's to identify resources from JS. P.S. Of course even if this proposition would be implemented we should have some parameter to explicitly specify that we need or don't need |
Johannes Hiemer commented Inlined projection entities do not contain any hrefs, which makes it nearly impossible to follow the entity with hal. This should be added in my opinion |
Oliver Drotbohm commented This should be fixed guys. We now add both self links for projected entities and also keep the link pointing to the association. I back-ported the change as far as id applied cleanly. As an example see this gist to document the before and after stage |
Johannes Hiemer commented Just tested it with 2.3.1.BUILD-SNAPSHOT and no links inside projected entities. :-( |
Johannes Schmidt commented I tried several version of spring data rest, but not links for inline objects in projections are shown. Spring Boot: 1.3.2 / 1.2.7 Is it possible to display the links at the moment? |
George T commented Tested also on 2.4.2. No links are returned. |
Johannes Schmidt commented Is it possible to reopen this issue? |
Oliver Drotbohm commented It unfortunately is not as it appears in change logs of already released versions. Feel free to open a new ticket if you like to see things improved |
Szymon Stasik opened DATAREST-302 and commented
Having inlined resource it would be usefull to have access to its resources. eg. for
and
after using projection to inline customer the reference to customer.address is being lost:
Affects: 2.1 RC1 (Dijkstra)
Issue Links:
("is duplicated by"_)
Referenced from: commits 2697c6a, 5895b5e, b4bfee3
Backported to: 2.3.1 (Fowler SR1), 2.2.3 (Evans SR3)
1 votes, 6 watchers
The text was updated successfully, but these errors were encountered: