openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From colorado_flyer <>
Subject reserved words issue
Date Fri, 02 Jul 2010 19:05:03 GMT

Hi all,

I tried posting this to the Users forum, did not get any response at all
yet, so I thought I would try this list.

I'm converting a legacy system into JPA and ran across this issue.  I looked
for a resolution, and found some talk about the issue, but did not see any
resolution so I thought I would post and see how I can fix this.

I'm converting into OpenJPA 2.0.0, using a legacy system so I can't change
the db.

One of the tables has a column named "PRIMARY" which is listed in the
invalidColumnWordSet (using PostgresQL).

I'm not sure where things go wrong here, but the MappingInfo(line 683) class
recognizes the column as being reserved.  It then invokes a method
'getValidColumnName' (MappingInfo line 684) which returns a name "PRIMARY0". 
Next it goes out to the table and looks for a column in the table with a
name of PRIMARY0 which is not found and a MegaDataException is then thrown.

Has anyone run across this issue and fixed it?  I'm hoping there is some
work around for this, as I'm sure it will be the same issue for any words in
the invalidColumnWordSet for any of the DBDictionary(s) out there.

View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message