Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 322DAF405 for ; Tue, 26 Mar 2013 20:49:16 +0000 (UTC) Received: (qmail 89166 invoked by uid 500); 26 Mar 2013 20:49:16 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 89129 invoked by uid 500); 26 Mar 2013 20:49:16 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 89120 invoked by uid 99); 26 Mar 2013 20:49:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 20:49:16 +0000 Date: Tue, 26 Mar 2013 20:49:15 +0000 (UTC) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OPENJPA-2358) openjpa-maven-plugin generates wrong sql for derby MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OPENJPA-2358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13614527#comment-13614527 ] Rick Curtis commented on OPENJPA-2358: -------------------------------------- I suspect it has to do something with --> @Table(uniqueConstraints = @UniqueConstraint(columnNames = { "..... "dataType" })) and DBDictionary.supportsNullUniqueColumn. Does Derby support having a null value in a column that is unique? > openjpa-maven-plugin generates wrong sql for derby > -------------------------------------------------- > > Key: OPENJPA-2358 > URL: https://issues.apache.org/jira/browse/OPENJPA-2358 > Project: OpenJPA > Issue Type: Bug > Components: tooling > Affects Versions: 2.2.1 > Environment: linux (fedora 16, x86_64), oracle jdk 1.7.0_17-b02, Maven 3.0.5, derby 10.9.1.0 > Reporter: Ted Leung > Attachments: openjpa_derby_test.tar.gz > > > model object fields are not defaulting to allow null, even when I explicity set @Column(nullable=true), it still generates the columns as "not null". > As an example : > @Column(nullable = true, length = 128) > private String dataType; > results in generated sql of : > dataType VARCHAR(128) NOT NULL > This happens for both org.apache.derby.jdbc.ClientDriver, and org.apache.derby.jdbc.EmbeddedDriver. As a test, I changed the driver to the MySql driver and everything worked as expected so I'm fairly sure this is not a configuration / setup issue unless there's special configuration required for derby. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira