Skip to content
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

Support Spring Data JpaRepository#getReferenceById(ID) (replacement for deprecated getOne(ID)) #41987

Closed
famod opened this issue Jul 18, 2024 · 7 comments · Fixed by #41993
Closed
Labels
area/spring Issues relating to the Spring integration kind/enhancement New feature or request
Milestone

Comments

@famod
Copy link
Member

famod commented Jul 18, 2024

Description

JpaRepository#getOne(ID) was marked deprecated a long time ago: spring-projects/spring-data-jpa#1697
and javadoc suggests to use getReferenceById: spring-projects/spring-data-jpa#2398
In Quarkus, we are seeing this deprecation since #40344.

Now, when trying to use getReferenceById the following is thrown:

io.quarkus.spring.data.runtime.FunctionalityNotImplemented: Method getReferenceById of class foo.BarRepository_cbd379646a149ba2465a399aca3df36673c2a7c1Impl from Spring Data has not yet been implemented

Implementation ideas

Support getReferenceById just like getOne

@famod famod added kind/enhancement New feature or request area/spring Issues relating to the Spring integration labels Jul 18, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 18, 2024

/cc @geoand (spring)

@geoand
Copy link
Contributor

geoand commented Jul 19, 2024

cc @aureamunoz

@famod
Copy link
Member Author

famod commented Jul 19, 2024

Please note that #getById and #deleteInBatch are deprecated too.

@funnyDevGirl
Copy link

Hi!
Is it relevant, or has someone already taken up the task?

aureamunoz added a commit to aureamunoz/quarkus that referenced this issue Jul 19, 2024
@geoand
Copy link
Contributor

geoand commented Jul 19, 2024

Lets see if @aureamunoz already has or not, otherwise it's yours :)

@aureamunoz
Copy link
Member

Oups, just raised the PR with the change: #41993

aureamunoz added a commit to aureamunoz/quarkus that referenced this issue Jul 19, 2024
@geoand geoand closed this as completed in 4e06bfb Jul 19, 2024
@quarkus-bot quarkus-bot bot added this to the 3.14 - main milestone Jul 19, 2024
@famod
Copy link
Member Author

famod commented Jul 19, 2024

Oh wow, that was quick - thanks all!

@gsmet gsmet modified the milestones: 3.14 - main, 3.13.0 Jul 22, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jul 22, 2024
…ethods that were lacking

Fixes quarkusio#41987

(cherry picked from commit 4e06bfb)
barreiro pushed a commit to barreiro/quarkus that referenced this issue Jul 25, 2024
holly-cummins pushed a commit to holly-cummins/quarkus that referenced this issue Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/spring Issues relating to the Spring integration kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants