Skip to content

Update/deletion of speaker fails #191

Description

@martinfmi

Trying to edit or delete speaker with ID 9 (Milen Dyankov) fails.
Steps to reproduce:

  1. navigate to https://jprime.io/admin/speaker/edit/9
  2. try to modify some field
  3. Save
  4. Request is sent but nothing is updated

Trying to delete the speaker gives the following constraint exception:

May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 INFO 355893 --- [-8080-exec-6772] o.h.e.j.b.i.AbstractBatchImpl : HHH000010: On release of batch it still contained JDBC statements
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 ERROR 355893 --- [-8080-exec-6772] o.h.e.j.b.i.BatchingBatch : HHH000315: Exception executing batch [java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (jprime.Session, CONSTRAINT FK_lbsdck6wuoavhk28w7q6i4cf3 FOREIGN KEY (submission) REFERENCES Submission (id))], SQL: /* delete site.model.Submission / delete from Submission where id=?
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 WARN 355893 --- [-8080-exec-6772] o.h.e.j.s.SqlExceptionHelper : SQL Error: 1451, SQLState: 23000
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 ERROR 355893 --- [-8080-exec-6772] o.h.e.j.s.SqlExceptionHelper : Cannot delete or update a parent row: a foreign key constraint fails (jprime.Session, CONSTRAINT FK_lbsdck6wuoavhk28w7q6i4cf3 FOREIGN KEY (submission) REFERENCES Submission (id))
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.080 ERROR 355893 --- [-8080-exec-6772] o.h.i.ExceptionMapperStandardImpl : HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute batch]
May 03 15:01:02 hp-jprime java[355893]: 2022-05-03 15:01:02.082 ERROR 355893 --- [-8080-exec-6772] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [/
delete site.model.Submission */ delete from Submission where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch] with root cause
May 03 15:01:02 hp-jprime java[355893]: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (jprime.Session, CONSTRAINT FK_lbsdck6wuoavhk28w7q6i4cf3 FOREIGN KEY (submission) REFERENCES Submission (id))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions