开发者

ORA-01790 with EntityFramework

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?!


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜