Re: column already exists....column reserved word

2012-04-27 Thread Jason
Rick, When I set that property, I get the following build time error: [ERROR] Failed to execute goal org.codehaus.mojo:openjpa-maven-plugin:1.2:sql (enhancer) on project mapseq-dao-api: Execution enhancer of goal org.codehaus.mojo:openjpa-maven-plugin:1.2:sql failed:

Re: column already exists....column reserved word

2012-04-27 Thread Rick Curtis
Jason - What do you have set for properties in your persistence.xml file? Thanks, Rick On Fri, Apr 27, 2012 at 9:52 AM, Jason jdr0...@renci.org wrote: Rick, When I set that property, I get the following build time error: [ERROR] Failed to execute goal

Re: column already exists....column reserved word

2012-04-27 Thread Jason
Rick, Here are my properties: property name=openjpa.jdbc.MappingDefaults value=ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict / property name=openjpa.Log value=DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=WARN / property

Re: column already exists....column reserved word

2012-04-27 Thread Rick Curtis
How are you configuring your database connection? On Fri, Apr 27, 2012 at 10:46 AM, Jason jdr0...@renci.org wrote: Rick, Here are my properties: property name=openjpa.jdbc.**MappingDefaults value=ForeignKeyDeleteAction=**restrict, JoinForeignKeyDeleteAction=**restrict /

Re: column already exists....column reserved word

2012-04-27 Thread Jason
Rick, I have an application that sits on top of a Karaf container. One of my maven projects is an osgi bundle which deploys a datasource as a service. I, then, have the following in the persistence.xml file to get that datasource:

Re: column already exists....column reserved word

2012-04-27 Thread Rick Curtis
Jason - Sorry, try the following property[1] looks like I had you try the wrong value for this prop before(sorry). I'll try to load postgres up on my machine this afternoon if it doesn't work. Thanks, Rick [1] property name=openjpa.jdbc.DBDictionary

Re: column already exists....column reserved word

2012-04-26 Thread Jason
Rick, If I wrap the reserved word in quotes (\...\), then the column is created correctly. Here is the generated create table sql: CREATE TABLE xxx (guid BIGINT NOT NULL, approved BOOL, grant VARCHAR(64), PRIMARY KEY (guid)); Yet, when I try to persist to that table, OpenJPA runs an alter

Re: column already exists....column reserved word

2012-04-26 Thread Rick Curtis
Jason -- I'm able to recreate your failure when running against MySQL and a hacked up runtime. Can you try running with the following property[1] set ? Thanks, Rick [1] property name=openjpa.jdbc.DBDictionary value=postgres(supportsDelimitedIdentifiers=false)/ On Thu, Apr 26, 2012 at 10:03 AM,

Re: column already exists....column reserved word

2012-04-25 Thread Rick Curtis
Jason - What version of OpenJPA are you running? Can you post the full stacktrace? On Tue, Apr 24, 2012 at 11:56 AM, Jason jdr0...@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

Re: column already exists....column reserved word

2012-04-25 Thread Jason
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,

Re: column already exists....column reserved word

2012-04-25 Thread Rick Curtis
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,

column already exists....column reserved word

2012-04-24 Thread Jason
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: