From dev-return-4676-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Wed Jun 27 18:39:47 2007 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 9438 invoked from network); 27 Jun 2007 18:39:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Jun 2007 18:39:47 -0000 Received: (qmail 93771 invoked by uid 500); 27 Jun 2007 18:39:50 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 93752 invoked by uid 500); 27 Jun 2007 18:39:50 -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 93743 invoked by uid 99); 27 Jun 2007 18:39:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2007 11:39:49 -0700 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; Wed, 27 Jun 2007 11:39:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D4BB771418E for ; Wed, 27 Jun 2007 11:39:25 -0700 (PDT) Message-ID: <30626854.1182969565845.JavaMail.jira@brutus> Date: Wed, 27 Jun 2007 11:39:25 -0700 (PDT) From: "Michael Dick (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Resolved: (OPENJPA-269) Informix doesn't support subselects or using table aliases in a delete statement. In-Reply-To: <14807031.1182968905920.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-269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Dick resolved OPENJPA-269. ---------------------------------- Resolution: Fixed Fix Version/s: 1.0.0 Assignee: Michael Dick > Informix doesn't support subselects or using table aliases in a delete statement. > ---------------------------------------------------------------------------------- > > Key: OPENJPA-269 > URL: https://issues.apache.org/jira/browse/OPENJPA-269 > Project: OpenJPA > Issue Type: Bug > Reporter: Michael Dick > Assignee: Michael Dick > Fix For: 1.0.0 > > > Informix doesn't support using table aliases in a delete statement if you have an index on the table. For example if we issue the SQL statement : > "delete from quoteejb t0" a Syntax error will be thrown by the Informix JDBC driver. Whereas "delete from quoteejb" would work. > This problem seems to be fixed by setting allowAliasInBulkClause to false in InformixDBDictionary. Another possibility is to check whether there is an index on the table, if no index is present we should be able to use the alias. I haven't verified whether that approach works though. > A second problem occurred when we tried to issue the following statement : > DELETE FROM holdingejb WHERE holdingID IN (SELECT DISTINCT t0.holdingID FROM holdingejb t0 WHERE (t0.ACCOUNT_ACCOUNTID IS NULL)) > The second problem was resolved by setting supportsSubselect to false in InformixDBDictionary. > In the current implementation when supportsSubselect is false we never check allowAliasInBulkClause so the first change might not be necessary. If the implementation changes we might run into the problem again, so I'd prefer to change both variables. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.