openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <>
Subject Re: problem with reserved words
Date Tue, 06 Jul 2010 13:45:09 GMT
Have you tried to something like @Table(name="\"PRIMARY\"") ?


On Wed, Jun 30, 2010 at 2:06 AM, colorado_flyer <>wrote:

> Hi all,
> 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
> 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.
> tia,
> -chris

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