Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 48575 invoked from network); 2 Jul 2010 19:09:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Jul 2010 19:09:49 -0000 Received: (qmail 75073 invoked by uid 500); 2 Jul 2010 19:09:49 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 74948 invoked by uid 500); 2 Jul 2010 19:09:48 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Delivered-To: moderator for dev@openjpa.apache.org Received: (qmail 71837 invoked by uid 99); 2 Jul 2010 19:05:31 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_HELO_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: unknown (nike.apache.org: error in processing during lookup of chris@parallelsw.com) Date: Fri, 2 Jul 2010 12:05:03 -0700 (PDT) From: colorado_flyer To: dev@openjpa.apache.org Message-ID: <1278097503411-5248893.post@n2.nabble.com> Subject: reserved words issue MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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. tia, -chris -- View this message in context: http://openjpa.208410.n2.nabble.com/reserved-words-issue-tp5248893p5248893.html Sent from the OpenJPA Developers mailing list archive at Nabble.com.