Id field is a PK but is also a FK pointing towards a PK of a main table

K

Ken Loh

Hi Gurus,

I'm a newbie to Entity Beans.

In my database, there are various tables which their ID columns derive
their values from a main table's ID column. These ID columns are all
primary keys to their respective tables. This also means that apart
from the main table, all the ID columns are also foreign keys.

The ID column of the main table is auto-incremented. This relationship
ensure that no records in the various non-main tables have the same
IDs.

My problem is, how could I set up my associated entity beans of
various classes to be created such that their IDs (which are PKs) are
derived from the main table's auto-incremented ID column ?

Thanking you in advance,
Newbie to Entity Bean.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top