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

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
kentatcap
Posts: 9
Joined: Tue 12 Jul 2016 15:47

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

Post by kentatcap » 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;

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

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

Post by Shalex » Mon 15 Aug 2016 18:11

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?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

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

Post by Shalex » Fri 26 Aug 2016 17:21

We have answered you by email.

Post Reply