Leave a Reply

263 Comments on "Spring Boot Quick Start 29 – Making Crud Operations with Repository"

Notify of
avatar

Akshay Bahuguna
Guest
Akshay Bahuguna
1 month 12 days ago

Can not find "findOne" method in Spring boot 2.0.3 release. the other option is findById but it return Option<Entity instance/Topic> Please help

Krays Max
Guest
Krays Max
1 month 25 days ago

It's a really good example of data base, let me guess what I need to do to lose all data, I think that I just need to restart the server.

yoshi mitzu
Guest
yoshi mitzu
1 month 26 days ago

I see that the update method compared to the update method in the lesson before only updates every value besides the id itself.

Anupam Maheshwari
Guest
Anupam Maheshwari
1 month 27 days ago

Hi, On first attempt to run the application after creating the @Entity and extends CrudRepository and calling Crud operations, I am getting the below exception on console while connecting to Derby Database while starting the application itself: org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC StatementCaused by: java.sql.SQLSyntaxErrorException: Schema 'SA' does not exist. Didn't understand how to resolve it. Seek Help. Thanks.

Vamshi Krishna
Guest
Vamshi Krishna
2 months 7 days ago

I got an error Spring Boot – Cannot determine embedded database driver class for database type NONEI dont know why I would get it if I am using embedded db.and I could not resolve it, I was using application.properties file if that even matters. To keep on going, I had to use h2 db as suggested by one of the stackoverflow ans, if anyone has an answer please comment below. Thank you

Matteo Gioioso
Guest
Matteo Gioioso
2 months 8 days ago

The update method does not work anymore.In order to create a simple UpdateById, you just have to set the Id (from the PathVariable) to the topic entity (from the RequestBody). topic.setId(Long topicId) and then save(topic).I hope this help!

kookoon
Guest
kookoon
2 months 13 days ago

CrudRepository.findOne() is gone as of Spring Data Core 2.0.7

Bishwajit Vikram
Guest
Bishwajit Vikram
2 months 9 days ago

use this :: CrudRepository.findById(String Id) —-> it returns the Optional, so you have to use this way,return topicRepository.findById(id).orElse(null);

murthuja vali
Guest
murthuja vali
2 months 19 days ago

Will it work If I don't have any set up for Derby database.Will it connect to Cloud?

LucasofAppalachia
Guest
LucasofAppalachia
2 months 23 days ago

Excellent tutorial. Looks like they replaced the findOne method with findById though :/

Sebastián Benítez
Guest
Sebastián Benítez
2 months 26 days ago

For whose have this error:Consider defining a bean named 'entityManagerFactory' in your configuration. Just try to delete the repository folder in maven that should be under $ ~/.m2/repository then go to the root of your project, wherever you have it and run $mvn clean installThen run again your project, and it should work without an issue. Here is the source: github.com/spring-guides/gs-accessing-data-mysql/issues/10

1 2 3 16
wpDiscuz