Page 1 of 1

Table with model defined (foreign key) relationships to multiple tables

Posted: Tue 09 Aug 2016 20:55
by kentatcap
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;

Re: Table with model defined (foreign key) relationships to multiple tables

Posted: Mon 15 Aug 2016 18:11
by Shalex
Could you please send us (via FTP like you did in the ticket 181790 and confirm via contact form) a small test project with the corresponding DDL/DML script so that we can reproduce the issue in our environment?

Re: Table with model defined (foreign key) relationships to multiple tables

Posted: Fri 26 Aug 2016 17:21
by Shalex
We have answered you by email.