Expose ManyToOne relations from composite key in _links?
I have an Embeddable composite key consisting of two ManyToOne relations. Currently they are exposed as one self href item resource link. Is it possible to additionally expose each ManyToOne relation as a separate item resource link in the _links section?
Could you include a link to a reproducer, staged on github, ideally using https://start.spring.io, H2 (or Testcontainers for PostGreSQL, etc.), that demonstrates the feature you are looking?
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
@gregturn Here is the reproducer: https://github.com/mwyrembl/spring-data-rest-2240 If you start the project and request the resource: http://localhost:8080/cs/1_1 you get:
{
"d": {},
"_links": {
"self": {
"href": "http://localhost:8080/cs/1_1"
},
"c": {
"href": "http://localhost:8080/cs/1_1"
}
}
}
my question is if it is also possible to include links to A and B from the CId class like this without adding many-to-one relations in C class directly:
{
"d": {},
"a": {},
"b": {},
"_links": {
"self": {
"href": "http://localhost:8080/cs/1_1"
},
"c": {
"href": "http://localhost:8080/cs/1_1"
}
}
}