Reputation: 21
I'm using Entity-Framework with oracle.
I have a table 'Person' and a linking table 'Manager' that have 2 columns that are FK to 'Person' table.
(the first column is the manager and the second is the employee, each person has a manager)
of course, the EF did not generated the linking table.
when I'm trying to select a person.Include('Employees') i get a ORA-01790 error that means 'expression must have same datatype as corresponding expression'
All i want to do is to take a manager and get all of his employees.
I read the solutions online and did not find any answer,
help?!
Upvotes: 2
Views: 1114
Reputation: 5366
Very old question to answer, which might be indirectly relevant to your question.
The Entity Framework provider for Oracle is not able to handle more than 2 Include statements on a query.
It generates SQL that Oracle cannot handle which produces the "ORA-01790: expression must have same datatype as corresponding expression" error.
Some discussion of this issue here: https://community.oracle.com/thread/2349719
Upvotes: 1
Reputation: 1757
A data type mismatch error in relationship usually means the key data types are incompatible ie. key a is a string and key b is int
I would check your data types to make sure they match
Can you post your code so we can have a better idea of what's causing the error
Upvotes: 0