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

Query database table #12

Open
nicholaswkc34 opened this issue Dec 11, 2018 · 2 comments
Open

Query database table #12

nicholaswkc34 opened this issue Dec 11, 2018 · 2 comments

Comments

@nicholaswkc34
Copy link

nicholaswkc34 commented Dec 11, 2018

Dear All,
I'm using this library just for select query only. How to implement it?

@OverRide
public Optional findById(Integer id) {
return null;
}

Please help. Thanks in advance.

@nicholaswkc34
Copy link
Author

Please help. Urgent.

@rahshin
Copy link

rahshin commented Dec 12, 2018

Depends on what you want to do with this custom query as well as how your entity design looks like. If you are using Repository look at using the @query annotation.

You may have already read a similar article but here is a simple tutorial on queries using JPA Repository
https://www.petrikainulainen.net/programming/spring-framework/spring-data-jpa-tutorial-three-custom-queries-with-query-methods/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants