referenced record not shown when editing data

whip

Member²
When editing data in a foreign key column of a table then PL/SQL Developer shows a drop down list with data from the referenced table. This list usually contains the PK column and a few descriptive fields.

Today I started developing a new application based on new tables and only the PK column is shown in the drop down list in such a situation. Editing data in my old tables still works as it did before.

So my question is, how does PL/SQL Developer decide whether to show descriptive columns or not.

I have PL/SQL Developer Version 6.0.5.931 (MBCS).

Thanks,
Tom
 
There must be a foreign key with exactly one column, and the referenced table must not contain more than 1000 records.
 
Hy,

and which columns did PL/SQL Developer use?
In most of our tables we had
ID Name ...
And so PL/SQL Developer shows these two columns. But on some tables are there a few non interessting columns between ID and Name f.e.
ID FK_1 FK_2 Name

And so PL/SQL Developer show the first two or three columns but not the "interessting".

So how does PL/SQL Developer decide which columns are shown? and how much columns are shown?
 
It will display the primary key column and a column with the name "name" and "description". If these are not present it will take the first 2 columns in the table definition.
 
After some testing, I found that the trick is how you name (and populate) columns in the referenced table. In my case the table was:

create table CT_CATEGORIES
(
ID NUMBER(12) not null,
NAME VARCHAR2(240) not null,
EXT_KEY VARCHAR2(40),
DESCRIPTION VARCHAR2(4000)
);

The last column (description) was empty and I suspect PL/SQL Developer displayed ID and DESCRIPTION. I expected to see ID and NAME (first two columns). In my "old" tables there was no column named DESCRIPTION but ID and NAME were the first two and those were shown in the list.
 
@marco
How about an enhancement where you can adjust the column name which are shown?
Simple Reason: Because we are an german company our column names are "Nr" (for ID) or "Bezeichnung" (for DESCRIPTION/NAME).
 
Back
Top