alfio-event/alf.io

violates foreign key constraint when deleting an event

Closed this issue · 3 comments

iCodr8 commented

Describe the bug
I want do delete an event and get an error.

To Reproduce
Delete an event.

This is the log, when I want to delete an event
Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "ticket_field_configuration" violates foreign key constraint "ticket_field_value_ticket_field_configuration_id_fk_fkey" on table "ticket_field_value"
Detail: Key (id)=(13) is still referenced from table "ticket_field_value".
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2565) ~[postgresql-42.2.25.jar:42.2.25]
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2297) ~[postgresql-42.2.25.jar:42.2.25]
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:322) ~[postgresql-42.2.25.jar:42.2.25]
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481) ~[postgresql-42.2.25.jar:42.2.25]
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:401) ~[postgresql-42.2.25.jar:42.2.25]
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164) ~[postgresql-42.2.25.jar:42.2.25]
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:130) ~[postgresql-42.2.25.jar:42.2.25]
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[HikariCP-4.0.3.jar:?]
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) ~[HikariCP-4.0.3.jar:?]
at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:965) ~[spring-jdbc-5.3.18.jar:5.3.18]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:651) ~[spring-jdbc-5.3.18.jar:5.3.18]
... 135 more

syjer commented

hi @iCodr8 , could you specify which version are you using?

syjer commented

@iCodr8 thank you for the information, I've fixed this specific problem, it will be available in the new release.