I am getting this error: Too many objects match the primary key oracle.jbo.Key
when I tried to search in some view object where the primary key
is consists of more than one filed.
Use-case:
In Jdeveloper 11.1.2.3
I have Entity object
called someTable
this table has three fileds A,B and C
where the primary key
is consist of tow filed A and B
.
I created tow different View object
from someTable
enity object which are someTableVO1
andsomeTableVO2
. Filed A
in the view object somtableVO1
is a List Of Value(LOV)
and the data is coming form filed A
in the someTableVO2
.
In application I have a searching page which contain a drop down list for filed A
in somTableVO1
. Based on some conditions the drop down list values is not static. The value of the drop down list is changeable based on aselect
query executed on someTableVO1
and it is based on the thried filed C
which is NOT part of theprimary key
.
The page shows the drop down list with the correct values. But, I have a ValeChangeListener
method which will be activated when ever the user select some value form the drop down list.
The problem is:
The error Too many objects match the primary key
is occur when ever I am executing this method.
Assumption:
I think that the problem is with the multiple fields for the primary key. of curse there is a duplication in part of theprimary key
( i.e in one filed A
or B
) but the combination of A
and B
is always unique.
Notes:
1. I check the query by running it in SQL Developer
and it is not showing any duplicate values.
2. I did not attach code, because I think the problem is not about (how to do) it is about (what to do).
I hope the idea is clear