db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bouschen <mbo.t...@spree.de>
Subject Re: unique columns must be nullable ?
Date Tue, 12 Dec 2006 09:36:21 GMT

I ran into the same problem (not in the context Hibernate): I tried to 
define a unique index on a nullable column which does not work with 
derby. Here is what the derby doc says in the CONSTRAINTS section: 
UNIQUE  Specifies that values in the column must be unique. NULL values 
are not allowed. (see 

Is there any specific reason for not supporting unique for a nullable 
column? I find it useful to be able to specify a column may or may not 
have a value, but if the value is set it must be unique.

Regards Michael

> On this page http://wiki.apache.org/db-derby/HibernateHelp
> it says:
> "Hibernate Annotations do not work because Derby does not allow a unique column
> to be nullable"
> Is this (that Derby's unique column must be non-nullable) still true ?

Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66
Fax.:++49/30/2175 2012		D-10783 Berlin

View raw message