openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: column already exists....column reserved word
Date Wed, 25 Apr 2012 18:28:46 GMT
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 <jdr0887@renci.org> 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 <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<jdr0887@renci.org>  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*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message