Question

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 and someTableVO2. 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 a select query executed on someTableVO1 and it is based on the thried filed C which is NOT part of the primary 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 the primary 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

Was it helpful?

Solution

Problem Solved.

My aim was to show one filed which is A form someTableVO1 as a list of value and I was trying to achieve that by creating list of value form the same Entity object. I figure out that this was a wrong approach (Correct me if I am worng). to achieve that in ADF technology I should do the following:

  1. Simply drag and drop the view object from the Data Controls to the page.

  2. List of options will appear asking how you would like to show the view object like (Form, Graph,Table,Single selection,....).

3.Select Single Selection -> ADF one Selection

4.Select the attribute(s) you want to be shown to user as a list of values.

That's it...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top