"ORA-00904: \"Extent1\".\"DEPARTMENT_ID\": invalid identifier"
887763Sep 21 2011 — edited Sep 26 2011We are using ODAC 11.2.0.2.40 Beta 2 for Entity Framework and LINQ to Entities.
We have a LINQ query which causes the following error:
"ORA-00904: \"Extent1\".\"DEPARTMENT_ID\": invalid identifier"
This problem can be reproduced even by using Oracle Human Resource sample database as follows:
.....
var deps = entity.DEPARTMENTS.Where(d => d.EMPLOYEES.Any(emp => emp.JOB_HISTORY.Any(j => j.JOB_ID == "AC_MGR")));
foreach (DEPARTMENT department in deps)
{
}
......
entity is an ObjectContext.
This query wants to reach the same result as following sql statement:
select *
from departments d
where exists (select *
from employees e
where (e.department_id = d.department_id and
exists ( select *
from job_history j where j.job_id = e.job_id and j.job_id = 'AC_MGR')))
Thanks for help!
Edited by: 884760 on Sep 21, 2011 5:28 PM