Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 35980 invoked from network); 17 Aug 2010 00:13:37 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Aug 2010 00:13:37 -0000 Received: (qmail 84346 invoked by uid 500); 17 Aug 2010 00:13:37 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 84301 invoked by uid 500); 17 Aug 2010 00:13:37 -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 84293 invoked by uid 99); 17 Aug 2010 00:13:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Aug 2010 00:13:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Aug 2010 00:13:36 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7H0DFPF023953 for ; Tue, 17 Aug 2010 00:13:16 GMT Message-ID: <7264863.383041282003995734.JavaMail.jira@thor> Date: Mon, 16 Aug 2010 20:13:15 -0400 (EDT) From: "Catalina Wei (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-1748) delete error when using constant joins with fetchtype lazy In-Reply-To: <4135014.43301280317515783.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OPENJPA-1748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899198#action_12899198 ] Catalina Wei commented on OPENJPA-1748: --------------------------------------- Michel, To reproduce the problem, could you provide the jave source code for Table1 and Table2 classes ? Thanks. > delete error when using constant joins with fetchtype lazy > ---------------------------------------------------------- > > Key: OPENJPA-1748 > URL: https://issues.apache.org/jira/browse/OPENJPA-1748 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 1.2.1 > Environment: - windows glassfish/mysql > - linux glassfish/mysql > - linux weblogic/oracle > Reporter: Michel Ganguin > Priority: Critical > > Entity (fetch lazy, without cascade): > @Entity > @Table(name="Table1") > public class Table1 { > @ManyToOne(optional = true, fetch = FetchType.LAZY) > @JoinColumns({ > @JoinColumn(name="FK" referencedColumnName="PK1"), > @JoinColumn(name="Table2.PK2" referencedColumnName="'a'") > }); > private Table2 table2; > } > I want to remove an entry: > Table1 t1 = entityManager.find(Table1.class, "table1Key"); > entityManager.remove(t1); > but this raises an exception because the parameter 'a' (from referencedColumnName) is missing. > org.apache.openjpa.persistence.PersistenceException: No value specified for parameter 2. {prepstmnt 1615708154 SELECT t1.* FROM Table1 t0 INNER JOIN Table2 t1 ON t0.FK = t1.PK1 AND ? = t1.PK2 WHERE t0.PK = ? [params=(String) table1Key]} [code=0, state=22023] > as workaround it works without errors if I change fetchtype to eager, but in my case this could have a great performance overhead. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.