Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Spring
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Liutauras Vilda
Paul Clapham
Sheriffs:
paul wheaton
Tim Cooke
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Piet Souris
Bartenders:
Mike London
Forums:
Spring
Object Relational Mapping
JpaRepository findOne returns null
shawn peter
Ranch Hand
Posts: 1325
1
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am using Spring boot in my project. When i try to retrieve object using repository.findone method is returns null value. I already autowired the repository . I can't fine the solution yet
Entity entity=entityRepository.findOne(id);
Tim Nachreiner
Ranch Hand
Posts: 93
1
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Without seeing more of your code it will be hard to troubleshoot. Try this:
-verify you are connecting to the database you THINK you are connecting to.
-annotate your Service class with @Transactional
shawn peter
Ranch Hand
Posts: 1325
1
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
yes, i found that i was connected local DB, not the server DB
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Delete Bidirectional many to one Entities
Passing classes to MVC controllers
How to create counter in Spring
$resource.save() AngularJS + Spring MVC
Problem with @autowiring beans in Spring/Maven Project
More...