Skip to Main Content

Oracle Developer Tools for Visual Studio

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

"ORA-00904: \"Extent1\".\"DEPARTMENT_ID\": invalid identifier"

887763Sep 21 2011 — edited Sep 26 2011
We 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2011
Added on Sep 21 2011
2 comments
6,413 views