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

Primary key in repository interface SpringDataUserRepository #131

Closed
julioapm opened this issue Mar 6, 2024 · 1 comment
Closed

Primary key in repository interface SpringDataUserRepository #131

julioapm opened this issue Mar 6, 2024 · 1 comment
Labels

Comments

@julioapm
Copy link

julioapm commented Mar 6, 2024

When compiling the latest version in Spring STS IDE, an error is shown in interface:

@Profile("spring-data-jpa")
public interface SpringDataUserRepository extends UserRepository, Repository<User, Integer> {

}

User classe has a String as ID, but the interface is declared with Integer. Should it be String? As in:

@Profile("spring-data-jpa")
public interface SpringDataUserRepository extends UserRepository, Repository<User, String> {

}

@arey arey added the bug label Mar 7, 2024
@arey
Copy link
Member

arey commented Mar 7, 2024

You're right @julioapm
Do you want to submit a Merge Request in order to fix this issue?

woody35545 added a commit to woody35545/spring-petclinic-rest that referenced this issue May 28, 2024
arey added a commit that referenced this issue May 28, 2024
fix: resolve issue #131 by fixing primary key type for user entity
@arey arey closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants