-
Notifications
You must be signed in to change notification settings - Fork 560
@Relation annotation not considered for link relation defaults #1974
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
Comments
I'm seeing the same issue, running under |
we are encountering the same problem after migrating to spring-boot-start-parent 2.3.6.RELEASE. |
The linked project actually builds fine using |
Nevermind, I made my way through it. There are a couple of things that are problematic / wring with the project but ultimately also a challenge I'd like to get you folks' input on: The project pulls in Spring Data REST. I.e. the requests are not answered by the code contained in the project but Spring Data REST. That in turn uses repository metadata and defaults to determine the link relations. Those are not customized and thus the defaults derived from the repository apply. More on that below. If I remove Spring Data REST, annotate the controller and representation model assembler properly, the link relations are customized as expected. With Spring Data REST in play, we currently order the repository based metadata inspection to trump the one base on entities. Otherwise Long story short, I am inclined to move this over to Spring Data REST as it clearly needs to be fixed there. The workaround in the meantime is to use |
Looks like this a rather trivial fix as the metadata detection already uses the |
Deprecated configuration methods on RepositoryRestConfiguration for better naming.
Fixed for 3.5, 3.4 and 3.3. |
Hello,
The JSON that gets returned is this:
I am attempting to change an entity name from employees to "workers" by using the following Relation annotation:
This has no effect on what gets returned.
The full source code of my test case is at:
https://github.com/dlynch158/relationtest
Thank you.
The text was updated successfully, but these errors were encountered: