Dear All,
I have a question about using compositie primary key in Hibernate or Hibernate EntityManager .
CAN the composite primary key CONTAINS NULL values?
e.g. sample table --
create table sample (key1 int not null, key2 char(10) null, data1 char(10) null,
primary key (key1, key2))
the composite primary key = key1 + key2 where key2 maybe null but key1 + key2 is guaranteed unique
as i am currently evaluating TopLink Essential, it seems toplink doesn't allow any null value in individual primary key column!!!
my company have a legacy system, that i can't change the table structure..
If hibernate or hibernate entitymanager allow null value in primary key, i will consider to switch to hibernate ....
Thank you very much....
|