-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Question about composite primary key with null values
PostPosted: Wed Oct 18, 2006 11:47 pm 
Newbie

Joined: Wed Oct 18, 2006 11:33 pm
Posts: 2
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....


Top
 Profile  
 
 Post subject: any one can tell me the answer
PostPosted: Thu Oct 19, 2006 11:53 pm 
Newbie

Joined: Wed Oct 18, 2006 11:33 pm
Posts: 2
could anybody answer my question??

thank you very much


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.