5 Replies Latest reply: Jan 30, 2014 4:37 PM by JDeveloper Newbie (11.1.1.6.0) Branched from an earlier discussion. RSS

EOs based on updatable database view errs when performing DML operations

JDeveloper Newbie (11.1.1.6.0) Explorer
Currently Being Moderated

Hi everyone,


What can be done about preventing the following two errors when working with EOs that are based on database views?


  1. JBO-25014: Another user has changed the row with primary key oracle.jbo.Key
  2. JBO-27101: Attempt to access dead entity in EO, key=oracle.jbo.Key


In my case, the underlying view has an inline query (below) that selects BranchId, and this data is needed for querying the data in the VO. In this case, I do not see how to create an EO for the branch and join it to the main EO. Adding posev.organization_id_child to the select clause and using that to join it to the main EO will not work. So, are there any suggestions you can share about preventing errors that occur when updating EOs based on database views?

 

(select
   hou.organization_id
   from
    hr_organization_units hou
   ,per_org_structure_elements_v posev
   ,per_organization_structures pos
   where 1 = 1
   and hou.organization_id = posev.organization_id_parent
   and pos.organization_structure_id = posev.org_structure_version_id
   and trunc(sysdate)
      between hou.date_from and nvl(hou.date_to,sysdate)
   and hou.type = 'BRANCH'
   and pos.name = 'PRIMARY HIERARCHY'
   start with posev.organization_id_child = t.employee_org_id
   connect by prior posev.organization_id_parent = posev.organization_id_child)
   branch_id

 

James