Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 8085 invoked from network); 6 Nov 2007 16:49:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Nov 2007 16:49:12 -0000 Received: (qmail 19839 invoked by uid 500); 6 Nov 2007 16:48:59 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 19813 invoked by uid 500); 6 Nov 2007 16:48:59 -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 Received: (qmail 19804 invoked by uid 99); 6 Nov 2007 16:48:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 08:48:59 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 16:49:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8D383714211 for ; Tue, 6 Nov 2007 08:48:50 -0800 (PST) Message-ID: <2851094.1194367730575.JavaMail.jira@brutus> Date: Tue, 6 Nov 2007 08:48:50 -0800 (PST) From: "Patrick Linskey (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-427) PostgresDictionary should set "63" as "maxAutoAssignNameLength". In-Reply-To: <13748013.1193925590576.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540478 ] Patrick Linskey commented on OPENJPA-427: ----------------------------------------- No objection to putting it into trunk. I don't see any need to put it into 1.0.x or 1.0.1. Personally, I'm very conservative about putting any changes at all into maintenance releases, since there can always be unintended side-effects that we should be insulating our maintenance-release-consumers from. > PostgresDictionary should set "63" as "maxAutoAssignNameLength". > ---------------------------------------------------------------- > > Key: OPENJPA-427 > URL: https://issues.apache.org/jira/browse/OPENJPA-427 > Project: OpenJPA > Issue Type: Bug > Components: sql > Affects Versions: 1.0.0, 1.1.0 > Environment: PostgreSQL 8.1. > Reporter: Ryosuke Iwata > Priority: Blocker > Attachments: mychanges.patch > > > PostgresDictionary should set "63" (or something correct) as "maxAutoAssignNameLength", in order to let DBDictionary#getGeneratedKeySequenceName() generate correct names for IDENTITY sequences. > OpenJPA trims IDENTITY sequence names longer than 32 characters, while PostgreSQL uses longer names for BIGSERIAL sequences. So, persisting entities with @Id column with GenerationType.IDENTITY often results in a database error such as : > org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: relation "x_school_membershi_entityid_seq" does not exist {prepstmnt 2398193 SELECT CURRVAL(X_SCHOOL_TRANSFER_entityId_SEQ')} [code=0, state=42P01] > The followings are the examples. "OK"s are the sequence names which PostgreSQL uses. "NG"s are those which OpenJPA attempts to use. > Ex.1 - > Table : X_SCHOOL_TRANSFER_EVENT > BIGSERIAL Column : ENTITYID > OK : X_SCHOOL_TRANSFER_EVENT_ENTITY_ID_SEQ > NG : 'X_SCHOOL_TRANSFER__ENTITYID_SEQ > Ex.2 - > Table : X_SCHOOL_MEMBERSHIP > BIGSERIAL Column : ENTITYID > OK : X_SCHOOL_MEMBERSHIP_ENTITYID_SEQ > NG : X_SCHOOL_MEMBERSHI_ENTITYID_SEQ -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.