This discussion is archived
1 Reply Latest reply: Nov 20, 2012 11:25 AM by Shay Shmeltzer RSS

Cascading Lovs

luisvil Newbie
Currently Being Moderated
Jdeveloper 11.1.2.3
ADFbc + JSF

using this model below , neither Cascading LOVs nor Cascading Auto Suggest works on Input table. (at county table on field (stateId) , cascading LOV or auto suggest)
this is Just because StateID is part of the Primary KEY for table county.
if we change the model and StateID is not part of primary key on county table, Everything Works Perfect!!, unfortunately this is something we cannot do on most cases

Is this something Oracle is going to fix in new releases or is something we have to live with????
same behavior happens in old version of JDeveloper.

thank you
-------------------------------------------------------------------------------------------------------------------------------
create table country
(country_id varchar2(3) constraint country_pk primary key,
country_name varchar2(50) constraint country_name_nn not null
);

create table state
(country_id varchar2(3) constraint state_country_id_nn not null,
state_Id varchar2(3) constraint state_id_nn not null,
state_name varchar2(50) constraint state_name_nn not null,
constraint state_pk primary key (country_id,state_id),
constraint state_by_country foreign key (country_id) references country(country_id)
);

create table county
(country_id varchar2(3) constraint county_country_id_nn not null,
state_id varchar2(3) constraint county_state_id_nn not null,
county_id varchar2(3) constraint county_id_nn not null,
county_name varchar2(50) constraint county_name_nn not null,
constraint county_key primary key (country_id,state_id,county_id),
constraint county_by_state foreign key (country_id,state_id) references state(country_id,state_id)
);

----------------------------------CHANGING PRIMARY KEY -------------------------------------------
create table county
(pkey raw(16) default sys_guid() constraint county_pkey primary key,
country_id varchar2(3) constraint county_country_id_nn not null,
state_id varchar2(3) constraint county_state_id_nn not null,
county_id varchar2(3) constraint county_id_nn not null,
county_name varchar2(50) constraint county_name_nn not null,
constraint county_alt_key unique (country_id,state_id,county_id),
constraint county_by_state foreign key (country_id,state_id) references state(country_id,state_id)
);

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points