Defeito #69
Aberta[AGHUse] [Erro] [Ambulatório] [ Hospital da Mulher ] - Erro ao excluir uma grade de agendamento
0%
Descrição
Reprodução do erro:
Acesse o módulo Ambulatório.
Vá até a seção Grades de Agendamento.
Tente excluir uma grade de agendamento.
O erro ocorre ao tentar excluir a grade, independentemente de as consultas associadas terem sido geradas ou excluídas previamente.
Arquivos
Atualizado por Lucas Xavier há 16 dias
- Situação alterado de Nova para Em andamento
LOG DE ERRO :
Caused by: java.sql.BatchUpdateException: Batch entry 0 delete from AGH.AAC_GRADE_AGENDAMEN_CONSULTAS where SEQ=2 and VERSION=4 was aborted: ERROR: update or delete on table "aac_grade_agendamen_consultas" violates foreign key constraint "aac_agp_grd_fk1" on table "aac_grade_profissionais"
Detail: Key (seq)=(2) is still referenced from table "aac_grade_profissionais". Call getNextException to see other errors in the batch.
at org.postgresql@42.6.0//org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:165)
at org.postgresql@42.6.0//org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2402)
at org.postgresql@42.6.0//org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:574)
at org.postgresql@42.6.0//org.postgresql.jdbc.PgStatement.internalExecuteBatch(PgStatement.java:896)
at org.postgresql@42.6.0//org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:919)
at org.postgresql@42.6.0//org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1685)
at org.jboss.ironjacamar.jdbcadapters@1.5.3.Final//org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeBatch(CachedPreparedStatement.java:714)
at org.jboss.ironjacamar.jdbcadapters@1.5.3.Final//org.jboss.jca.adapters.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:1180)
at org.hibernate@5.3.28.Final//org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:119)
... 234 more
Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "aac_grade_agendamen_consultas" violates foreign key constraint "aac_agp_grd_fk1" on table "aac_grade_profissionais"
Detail: Key (seq)=(2) is still referenced from table "aac_grade_profissionais".
at org.postgresql@42.6.0//org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713)
at org.postgresql@42.6.0//org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2401)