Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 846BA98BD for ; Wed, 25 Apr 2012 18:29:13 +0000 (UTC) Received: (qmail 33012 invoked by uid 500); 25 Apr 2012 18:29:13 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 32980 invoked by uid 500); 25 Apr 2012 18:29:13 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 32972 invoked by uid 99); 25 Apr 2012 18:29:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2012 18:29:13 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of curtisr7@gmail.com designates 209.85.215.46 as permitted sender) Received: from [209.85.215.46] (HELO mail-lpp01m010-f46.google.com) (209.85.215.46) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2012 18:29:08 +0000 Received: by lahj13 with SMTP id j13so475292lah.33 for ; Wed, 25 Apr 2012 11:28:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=68V/5AWjTdG5fCr1+S7HDlDKGNIXgSUeJrDbHQB8KAM=; b=qemGzaP30mL2SPT4D7GUaa+vg8nWELidorHg8eIQ+DN4PHGGq3e3BFNjW/MeGH2THC rr/yI9P+YR2IObQN7s3M8bYunzZdsdbzE6p5PpeOxQMlv5VmBIS2np9wtH9z361nYjB8 2gAImuowP6IUru59+qPJiLSlkEETOYeLYaPXK5noHvNUTtaauXeaQqCkKDwNXguBghaI yPjMpO77kg2SFhrVQNLgAGG4wAcWVci+pgLJ6y/NevOd535F/pf/pm+gbmJRHF1Zs37N vEtXJh9NJJUmGSwONtaUFwOC6+6KzzTqoDczvN9KegYVkC93RDJ+f4S13ajVmMqBc8Y4 xSOw== MIME-Version: 1.0 Received: by 10.112.28.33 with SMTP id y1mr1788134lbg.81.1335378526349; Wed, 25 Apr 2012 11:28:46 -0700 (PDT) Received: by 10.112.1.130 with HTTP; Wed, 25 Apr 2012 11:28:46 -0700 (PDT) In-Reply-To: <4F982C96.7030303@renci.org> References: <4F96DB30.5020204@renci.org> <4F982C96.7030303@renci.org> Date: Wed, 25 Apr 2012 13:28:46 -0500 Message-ID: Subject: Re: column already exists....column reserved word From: Rick Curtis To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=bcaec554d9aab42bc004be850aa2 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec554d9aab42bc004be850aa2 Content-Type: text/plain; charset=ISO-8859-1 Hmm, that is a super old JIRA. I would expect that this should work. Your original post said that the exception happens when creating tables... what happens if you create the tables by hand and delimit this table name via annotations (via \"...\")? Does the manual delimiter work at runtime? Thanks, Rick On Wed, Apr 25, 2012 at 11:55 AM, Jason wrote: > Rick, > > I am using OpenJPA v2.1.1. > > I did find this open bug related to the issue: https://issues.apache.org/* > *jira/browse/OPENJPA-84 > > After reading that bug, I figured that I will have to change the name of > the column to not be a reserved word until this bug is implemented/fixed. > > Regards, > Jason > > > On 04/25/2012 10:01 AM, Rick Curtis wrote: > >> Jason - >> >> What version of OpenJPA are you running? Can you post the full stacktrace? >> >> On Tue, Apr 24, 2012 at 11:56 AM, Jason wrote: >> >> Hi all, >>> >>> I am using OpenJPA with PostgreSQL. I have a table where a column has >>> the >>> name of "grant". How can I get the schema creation routine to wrap the >>> column name "grant" in quotes? Changing the column name is doable, but >>> not >>> preferable. >>> >>> I have tried the brain dead solution of just using: @Column(name = >>> "\"grant\"") >>> >>> But that results in an error...PersistenceException: column already >>> exists. >>> >>> Any suggestions? >>> >>> Regards, >>> Jason >>> >>> >>> >>> >>> >>> >> > -- *Rick Curtis* --bcaec554d9aab42bc004be850aa2--