While generating code using NetTiers template-set for oracle 9.2i schema, i recieved a message: "Table TRATE does not have a primary key, it will not be generated."
Then i've read a post about the same situation under MS SQL server and implemented the same schema under Oracle, here is it's sql code:
-- Create table
create table TRATE
(
IDRATE NUMBER not null
)
tablespace SYSTEM
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table TRATE
add constraint PK_TRATE primary key (IDRATE)
using index
tablespace SYSTEM
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create table
create table TURL_ROW
(
IDURL NUMBER not null
)
tablespace SYSTEM
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table TURL_ROW
add constraint PK_TURL_ROW primary key (IDURL)
using index
tablespace SYSTEM
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create table
create table TURLRATE_RAW
(
IDRATE NUMBER not null,
IDURL NUMBER not null
)
tablespace SYSTEM
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate primary, unique and foreign key constraints
alter table TURLRATE_RAW
add constraint PK_TURLRATE_RAW primary key (IDRATE,IDURL)
using index
tablespace SYSTEM
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
alter table TURLRATE_RAW
add constraint FK_TURLRATE_RAW_TRATE foreign key (IDRATE)
references TRATE (IDRATE);
alter table TURLRATE_RAW
add constraint FK_TURLRATE_RAW_TURL_RAW foreign key (IDURL)
references TURL_ROW (IDURL);
But the problem remained.
It seems to me, that problem is in "OracleNativeSchemaProvider"