Hi,
I have a question on how to map the following situation:
I have two tables: INDIVIDUAL_NOTES and INDIVIDUAL.
The notes table links to the individual table via I_IID column which is the pk of the notes table but not a pk of the individual table. This is because i am keeping versions of individuals but i want them all linked to the same notes. So the individual table has its own pk I_ID and I_IID is shared by all versions.
Any idea on how to map this in hibernate?
Thanks
-Igor
create table INDIVIDUAL_NOTES (
I_IID varchar(20) not null,
IN_NOTES varchar(5000) null,
primary key (IN_IID)
);
create table INDIVIDUAL (
I_ID numeric(19,0) identity not null,
I_IID varchar(20) not null,
I_EFFECTIVE_DATE datetime not null,
I_CURRENT tinyint null,
U_NAME_FIRST varchar(20) not null,
U_NAME_LAST varchar(20) null,
U_NAME_MIDDLE varchar(1) not null,
primary key (I_ID)
);
|