14:07:09,110 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] - SQL Error: 2291, SQLState: 23000
14:07:09,110 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] - ORA-02291: restrição de integridade (UNIP.FK_CLIENTE) violada - chave mãe não localizada
Ele da esse erro, porem os valores das chaves estão corretas, mas não faz o relacionamento, podem me ajudar?
Reparem no PES_CODIGO da tabela PESSOA e depois da tabela CLIENTE
Hibernate:
/* insert model.PessoaModel
*/ insert
into
PESSOA
(PES_ATIVO, PES_BAIRRO, PES_CADASTRO, PES_CELULAR, PES_CEP, PES_CIDADE, PES_COMPLEMENTO, PES_CPFCNPJ, PES_EMAIL, PES_ENDERECO, PES_FANTASIA, PES_FISICA, PES_FONE1, PES_FONE2, PES_NOME, PES_NUMERO, PES_RGIE, PES_SITE, PES_UF, PES_CODIGO)
values
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
14:07:01,128 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [1] as [CHAR] - [S]
14:07:01,128 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [2] as [VARCHAR] - [1]
14:07:01,128 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [3] as [VARCHAR] - [04/11/2018]
14:07:01,128 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [4] as [VARCHAR] - [1]
14:07:01,128 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [5] as [VARCHAR] - [1]
14:07:01,128 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [6] as [VARCHAR] - [1]
14:07:01,129 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [7] as [VARCHAR] - [1]
14:07:01,129 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [8] as [VARCHAR] - [1]
14:07:01,129 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [9] as [VARCHAR] - [1]
14:07:01,129 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [10] as [VARCHAR] - [1]
14:07:01,129 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [11] as [VARCHAR] - [1]
14:07:01,129 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [12] as [CHAR] - [S]
14:07:01,129 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [13] as [VARCHAR] - [1]
14:07:01,130 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [14] as [VARCHAR] - [1]
14:07:01,130 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [15] as [VARCHAR] - [1]
14:07:01,130 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [16] as [VARCHAR] - [1]
14:07:01,130 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [17] as [VARCHAR] - [1]
14:07:01,130 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [18] as [VARCHAR] - [1]
14:07:01,130 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [19] as [VARCHAR] - [1]
14:07:01,131 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [20] as [INTEGER] - [12]
14:07:08,992 DEBUG [org.hibernate.SQL] -
/* insert model.ClienteModel
*/ insert
into
CLIENTE
(CLI_LIMITECRED, PES_CODIGO, CLI_CODIGO)
values
(?, ?, ?)
Hibernate:
/* insert model.ClienteModel
*/ insert
into
CLIENTE
(CLI_LIMITECRED, PES_CODIGO, CLI_CODIGO)
values
(?, ?, ?)
14:07:08,993 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [1] as [DOUBLE] - [1.0]
14:07:08,994 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [2] as [INTEGER] - [12]
14:07:08,994 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [3] as [INTEGER] - [9]
14:07:09,110 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] - SQL Error: 2291, SQLState: 23000
14:07:09,110 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] - ORA-02291: restrição de integridade (UNIP.FK_CLIENTE) violada - chave mãe não localizada