Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 45991 invoked from network); 1 Mar 2007 01:13:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Mar 2007 01:13:39 -0000 Received: (qmail 84741 invoked by uid 500); 1 Mar 2007 01:13:42 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 84658 invoked by uid 500); 1 Mar 2007 01:13:42 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 84494 invoked by uid 99); 1 Mar 2007 01:13:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Feb 2007 17:13:42 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= 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, 28 Feb 2007 17:13:32 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 364307142A4 for ; Wed, 28 Feb 2007 17:12:52 -0800 (PST) Message-ID: <31400050.1172711572216.JavaMail.jira@brutus> Date: Wed, 28 Feb 2007 17:12:52 -0800 (PST) From: "Patrick Linskey (JIRA)" To: open-jpa-dev@incubator.apache.org Subject: [jira] Updated: (OPENJPA-18) bulk update to Entity with secondary table mapping produces BAD SQL In-Reply-To: <13880856.1155769753829.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-18?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Linskey updated OPENJPA-18: ----------------------------------- Fix Version/s: 0.9.7 > bulk update to Entity with secondary table mapping produces BAD SQL > ------------------------------------------------------------------- > > Key: OPENJPA-18 > URL: https://issues.apache.org/jira/browse/OPENJPA-18 > Project: OpenJPA > Issue Type: Bug > Components: query > Reporter: David Wisneski > Fix For: 0.9.7 > > > EJBQL: update TwoTable t set t.k1 = t.j2+1, t.j2= t.k1+1 > TwoTable is mapped to primary and secondary table, tj1, tj2 are fields in primary table, tk1, tk2 are fields in secondary table. > Generated SQL from the trace shows: > DB2 SQL error: SQLCODE: -206, SQLSTATE: 42703, SQLERRMC: J2 {prepstmnt 238685754 UPDATE ttk SET k1 = (j2 + ?), j2 = (k1 + ?) WHERE id IN (SELECT DISTINCT t0.id FROM ttk t0 INNER JOIN ttj t1 ON t0.id = t1.TwoTable_id) [params=(long) 1, (long) 1]} [code=-206, state=42703] > Note that column j2 is not a column of take ttk which is the secondary table. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.