Dataset Designer - Faild to merge object(s) error
Posted: Wed 14 Jul 2010 12:52
Hi,
When i am adding an new table to an existing dataset, which the existing table on the dataset has an foregin key relation to the newly added table, the designer fires an error. " Faild to merge object(s) error- object reference does no set to an instance of object"
When i try to find the reason, "because there are alot of other datasets which has more then one tables, was created without any problem. I checked out that the difference was the column name. If the the related-fk constraint column has differen name than the related table, this exception is fired otherwise it works fine.
Table Example,
CREATE TABLE COUNTRIES
(
COUNTRY_CODE VARCHAR2(4) NOT NULL,
COUNTRY_NAME VARCHAR2(50)
);
ALTER TABLE COUNTRIES ADD (CONSTRAINT COUNTIRES_PK PRIMARY KEY(COUNTRY_CODE));
CREATE TABLE ACTIVE_COUNTRIES
(
ACTIVE_COUNTRY_CODE VARCHAR2(4) NOT NULL,
STATUS VARCHAR2(1) NOT NULL,
ACTIVATION_DATE DATE
);
ALTER TABLE ACTIVE_COUNTRIES ADD (CONSTRAINT ACTIVE_COUNTRIES_PK PRIMARY KEY(ACTIVE_COUNTRY_CODE));
ALTER TABLE ACTIVE_COUNTRIES ADD CONSTRAINT ACTIVE_COUNTRIES_FK FOREIGN KEY(ACTIVE_COUNTRY_CODE REFERENCES COUNTRIES(COUNTRY_CODE));
How can we fix this problem whithout changing the column names.
Thanks.
[/quote]
When i am adding an new table to an existing dataset, which the existing table on the dataset has an foregin key relation to the newly added table, the designer fires an error. " Faild to merge object(s) error- object reference does no set to an instance of object"
When i try to find the reason, "because there are alot of other datasets which has more then one tables, was created without any problem. I checked out that the difference was the column name. If the the related-fk constraint column has differen name than the related table, this exception is fired otherwise it works fine.
Table Example,
CREATE TABLE COUNTRIES
(
COUNTRY_CODE VARCHAR2(4) NOT NULL,
COUNTRY_NAME VARCHAR2(50)
);
ALTER TABLE COUNTRIES ADD (CONSTRAINT COUNTIRES_PK PRIMARY KEY(COUNTRY_CODE));
CREATE TABLE ACTIVE_COUNTRIES
(
ACTIVE_COUNTRY_CODE VARCHAR2(4) NOT NULL,
STATUS VARCHAR2(1) NOT NULL,
ACTIVATION_DATE DATE
);
ALTER TABLE ACTIVE_COUNTRIES ADD (CONSTRAINT ACTIVE_COUNTRIES_PK PRIMARY KEY(ACTIVE_COUNTRY_CODE));
ALTER TABLE ACTIVE_COUNTRIES ADD CONSTRAINT ACTIVE_COUNTRIES_FK FOREIGN KEY(ACTIVE_COUNTRY_CODE REFERENCES COUNTRIES(COUNTRY_CODE));
How can we fix this problem whithout changing the column names.
Thanks.
[/quote]