Win a copy of Spark in Action this week in the Open Source Projects forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Hibernate SpringBoot CrudRepository Delete is not working

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Topic : Hibernate CrudRepository delete function is not working.

Question:

I have the code here: https://github.com/vishwabhat19/Instructor.git

Instructor has a one to one unidirectional relation with InstructorDetail as shown below:



In my SpringBoot Application class I am saving the entity and deleting the same.



The save is working, but the delete is not. I still have that entry in my mySQL database. There is no error/exception.

Questions:

1. Why is the delete not working?
2. Every time I run the program(application class) why is a new record not created in the Instructor and InstructorDetail table ?

Thanks in advance.
 
Vishwa Bhat
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more thing to note here would be that the deleteById() method works fine and deletes the record, but delete fails with no error or exceptions.
 
It's a pleasure to see superheros taking such an interest in science. And this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic