Bom dia!
Fiz o mapeamento de duas classes, uma como herança ancestral e outra como descendente, a classe mãe ficou com a seguinte anotação "@Inheritance(strategy=InheritanceType.SINGLE_TABLE)", indicando que os dados serão gravados na mesma tabela, no momento da gravação o sistema registra o seguinte erro no console:
insert
into
PESSOAL
(VERSAO, DATA_ULT_ALTERACAO, USUARIO_ULT_ALTERACAO, NIP, NOME_COMPLETO, NOME_GUERRA, DATA_NASCIMENTO, DATA_INCORPORACAO, DATA_APRESENTACAO_OM, DATA_APRESENTACAO_AREA, ID_DEPARTAMENTO, ID_DIVISAO, ID_SITUACAO, SEXO, ESTADO_CIVIL, POSTO_GRADUACAO, ID_ESPECIALIDADE, TIPO_PLC)
values
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'PessoalMilitarEntity') select
scope_identity()
#sagom# WARN [JDBCExceptionReporter] SQL Error: 8152, SQLState: 22001 09:32:22,028 [http-8080-1]
#sagom# ERROR [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]String or binary data would be truncated. 09:32:22,028 [http-8080-1]
#sagom# WARN [JDBCExceptionReporter] SQL Error: 3621, SQLState: HY000 09:32:22,028 [http-8080-1]
#sagom# ERROR [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The statement has been terminated. 09:32:22,028 [http-8080-1]
#sagom# ERROR [PlcBaseHibernateDAO] Usuario corrente: CESAR Erro: Erro inesperado no método "inclui". <br/>Mensagem original do sistema: could not insert: [mb.baenspa.entidade.PessoalMilitarEntity] 09:32:22,043 [http-8080-1]
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]String or binary data would be truncated.
Alguém sabe onde está o problema?
Grato,
César
Autor: César Bezerra
