openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Dirichs <>
Subject Re: Nullable unique constraints
Date Fri, 13 Nov 2009 15:02:17 GMT

Daryl Stultz wrote:
> When I define my field as "unique = true, nullable = true" and then run
> the
> mapping tool to build the DDL it generates the column as "not null". It
> does
> seem to be that null is incompatible with unique. Is this an OpenJPA thing
> or a JPA spec?

This seems to be an OpenJPA issue. I also had the same question as you and
so far got no explanation for this behaviour of OpenJPA. The JPA spec
doesn't mention this coupling of unique constraints and non-nullability. I
have filed a corresponding issue here:

(This reply is rather late; I came across your request via an explicit

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message