Tarde pessoal,
To com um problema em duas tabelas do meu banco Oracle.
Todas as outras tabelas funcionam direitinho com generator=“increment”, menos essas duas
O erro é o seguinte:
could not fetch initial value for increment generator
java.sql.SQLException: ORA-00942: a tabela ou view não existe
mapeamento:
<class name="sacweb.prazoconsulta.vo.VOPrazoConsulta" table="LCT_MODAL_COMPRA" schema="LC">
<id name="codPrazoConsulta" type="long" column="COD_MODAL_COMPRA" >
<generator class="increment" />
</id>
<property name="desPrazoConsulta" type="string" column="DES_MODAL_COMPRA"/>
<property name="indLicitacao" type="string" column="IND_LICITACAO"/>
<property name="qtdDiasConsulta" type="long" column="QTD_DIAS_CONSULTA"/>
</class>
<class name="sacweb.instituicaofinanceira.vo.VOInstituicaoFinanceira" table="PUT_BANCO" schema="PU">
<id name="codInstituicaoFinanceira" column="COD_BANCO">
<generator class="increment"/>
</id>
<property name="desInstituicaoFinanceira" type="string" column="NOM_BANCO"/>
</class>
script:
/*==============================================================*/
/* Table: LCT_MODAL_COMPRA */
/*==============================================================*/
create table LC.LCT_MODAL_COMPRA (
COD_MODAL_COMPRA VARCHAR2(2) not null,
DES_MODAL_COMPRA VARCHAR2(30) not null,
IND_LICITACAO CHAR not null,
QTD_DIAS_CONSULTA NUMBER(3),
constraint LCT_MODAL_COMPRA_PK primary key (COD_MODAL_COMPRA)
using index
maxtrans
pctfree 10
initrans 2
)
pctfree 10
pctused 40
initrans 1;
comment on column LC.LCT_MODAL_COMPRA.COD_MODAL_COMPRA is
'C?DIGO DA MODALIDADE DE COMPRA';
comment on column LC.LCT_MODAL_COMPRA.DES_MODAL_COMPRA is
'DESCRI??O DA MODALIDADE DE COMPRA';
comment on column LC.LCT_MODAL_COMPRA.IND_LICITACAO is
'INDICA TIPO DE LICITA??O';
comment on column LC.LCT_MODAL_COMPRA.QTD_DIAS_CONSULTA is
'PER?ODO PARA ACOMPANHAMENTO DE CONTRATOS (DIAS)';
/*==============================================================*/
/* Table: PUT_BANCO */
/*==============================================================*/
create table PU.PUT_BANCO (
COD_BANCO NUMBER(3) not null,
NOM_BANCO VARCHAR2(40) not null,
constraint PUT_BANCO_PK primary key (COD_BANCO)
using index
maxtrans
pctfree 10
initrans 2
)
pctfree 10
pctused 40
initrans 1;
comment on table PU.PUT_BANCO is
'Tabela de Bancos';
comment on column PU.PUT_BANCO.COD_BANCO is
'CODIGO DO BANCO';
comment on column PU.PUT_BANCO.NOM_BANCO is
'NOME DO BANCO';
Valeu!