Hi!
We've found an issue in the 3.2.7.955 version of the SchemaProvider: If there were multiple columns in a foreign key constraint, it reported these columns incorrectly. I don't know, if there were any fixes for this problem, but here is one:
To solve the problem, one should change the "sql" string in the "GetTableKeys" function to the following:
string sql = string.Format(
@"select
cols.constraint_name,
cols.column_name,
cols.position,
r_cons.table_name related_table_name,
r_cols.column_name related_column_name
from
all_constraints cons,
all_cons_columns cols,
all_constraints r_cons,
all_cons_columns r_cols
where cons.OWNER = '{0}'
and cons.table_name = '{1}'
and cons.constraint_type='R'
and cols.owner = cons.owner
and cols.table_name = cons.table_name
and cols.constraint_name = cons.constraint_name
and r_cols.owner = cons.r_owner
and r_cols.constraint_name = cons.r_constraint_name
and r_cons.owner = r_cols.owner
and r_cons.table_name = r_cols.table_name
and r_cons.constraint_name = r_cols.constraint_name
and cols.position= r_cols.position
order by cons.constraint_name, cols.position"
,
table.Owner,
table.Name);
Robert