Good afternoon person, I have this problem, it must first insert the person and then the client, he is not inserting either, if someone can help me to configure the models and hibernate to do this insert
ERROR
Hibernate:
select
SEQ_CLIENTE.nextval
from
dual
Hibernate:
select
SEQ_PESSOA.nextval
from
dual
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
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate:
/* insert model.ClienteModel
*/ insert
into
CLIENTE
(CLI_LIMITECRED, PES_CODIGO, CLI_CODIGO)
values
(?, ?, ?)
nov 01, 2018 4:57:05 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: 2291, SQLState: 23000
nov 01, 2018 4:57:05 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: ORA-02291: restrição de integridade (UNIP.FK_CLIENTE) violada - chave mãe não localizada
nov 01, 2018 4:57:05 PM org.hibernate.internal.ExceptionMapperStandardImpl mapManagedFlushFailure
ERROR: HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute statement]