Hi,
I need two javabeans with the relationship that one contains another, which is one-to-one relationship. For example, I have two tables:
CREATE TABLE PERSONS(
PERSON_ID NUMBER(8) NOT NULL,
FIRST_NAME VARCHAR2(32) NOT NULL,
LAST_NAME VARCHAR2(32) NOT NULL
);
CREATE TABLE RESERVATIONS(
RESERVATION_ID NUMBER(8) NOT NULL,
PERSON_ID NUMBER(8) NOT NULL,
REGISTRATION_UTC DATE NOT NULL,
COMMENTARY VARCHAR2(200) NULL
);
In which:
one instance of Class Reservations contains an instance of persons.
How to design the one-to-one relationship between them?
Hope someone could help me.
Thanks.
Yulei
|