Table with model defined (foreign key) relationships to multiple tables
Posted: Tue 09 Aug 2016 20:55
I get the following exception when trying to use Set<T>Add(T object). This T object could be the only added entity and I would get this error.
ORA-06550: line 4, column 99:
PL/SQL: ORA-00904: "<field_name>": invalid identifier
ORA-06550: line 4, column 1:
PL/SQL: SQL Statement ignored
This seems to be an issue where T table has a relationship link to 2x other tables but with neither a navigation property to those tables nor a foreign key setup in the database. Using my example below, if I added a TEST_FORM_HISTORY record, field_name would read "TEST_FORM1ID", seemingly a generated variable name of "TEST_FORM1" and "ID" from "TEST_FORM1". It would only work if the relationships were deleted.
TEST_FORM1
id number primary key;
test_value varchar(50);
TEST_FORM2
id number primary key;
test_value varchar(50);
TEST_FORM_HISTORY
id number primary key;
form_id number not null;
modified_date date;
ORA-06550: line 4, column 99:
PL/SQL: ORA-00904: "<field_name>": invalid identifier
ORA-06550: line 4, column 1:
PL/SQL: SQL Statement ignored
This seems to be an issue where T table has a relationship link to 2x other tables but with neither a navigation property to those tables nor a foreign key setup in the database. Using my example below, if I added a TEST_FORM_HISTORY record, field_name would read "TEST_FORM1ID", seemingly a generated variable name of "TEST_FORM1" and "ID" from "TEST_FORM1". It would only work if the relationships were deleted.
TEST_FORM1
id number primary key;
test_value varchar(50);
TEST_FORM2
id number primary key;
test_value varchar(50);
TEST_FORM_HISTORY
id number primary key;
form_id number not null;
modified_date date;