You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Martin Dirichs <na...@dirichs.fastmail.fm> on 2009/11/13 16:02:17 UTC

Re: Nullable unique constraints


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:
https://issues.apache.org/jira/browse/OPENJPA-1387

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

-- 
View this message in context: http://n2.nabble.com/Nullable-unique-constraints-tp3161182p3999677.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Nullable unique constraints

Posted by Daryl Stultz <da...@6degrees.com>.
On Fri, Nov 13, 2009 at 10:02 AM, Martin Dirichs <nabble@dirichs.fastmail.fm
> wrote:

>
> This seems to be an OpenJPA issue.

...

> https://issues.apache.org/jira/browse/OPENJPA-1387
>
>
Thanks Martin!

-- 
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:daryl@6degrees.com