Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 18854 invoked from network); 21 Jul 2010 22:19:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Jul 2010 22:19:02 -0000 Received: (qmail 46758 invoked by uid 500); 21 Jul 2010 22:19:02 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 46034 invoked by uid 500); 21 Jul 2010 22:19:01 -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 45877 invoked by uid 99); 21 Jul 2010 22:19:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jul 2010 22:19:01 +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; Wed, 21 Jul 2010 22:18:59 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o6LMB7pq020248 for ; Wed, 21 Jul 2010 22:11:08 GMT Message-ID: <16970639.506821279750267481.JavaMail.jira@thor> Date: Wed, 21 Jul 2010 18:11:07 -0400 (EDT) From: "Fay Wang (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-1740) Type expression for entites using Joined table strategy is not working properly In-Reply-To: <7607178.505601279747310282.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890923#action_12890923 ] Fay Wang commented on OPENJPA-1740: ----------------------------------- The patch will generate the correct SQL for the type expression: JPQL: SELECT p FROM Person p where TYPE(p) <> Contractor (1) SELECT t0.OID, t1.OID, t1.name, t2.description, t0.Dept_No, t0.FTEmpProp1 FROM WFulltimeEmployee t0 INNER JOIN WEmployee t2 ON t0.OID = t2.OID INNER JOIN WPerson t1 ON t2.OID = t1.OID WHERE (1=1) (2) SELECT t0.OID, t1.OID, t1.name, t2.description, t0.Dept_No, t0.PTEmpProp1 FROM WParttimeEmployee t0 INNER JOIN WEmployee t2 ON t0.OID = t2.OID INNER JOIN WPerson t1 ON t2.OID = t1.OID WHERE (1=1) JPQL: SELECT p FROM Person p where TYPE(p) = Contractor (1) SELECT t0.OID, t1.OID, t1.name, t2.description, t0.ContractorProp1, t0.Dept_No FROM WContractor t0 INNER JOIN WEmployee t2 ON t0.OID = t2.OID INNER JOIN WPerson t1 ON t2.OID = t1.OID WHERE (1=1) > Type expression for entites using Joined table strategy is not working properly > ------------------------------------------------------------------------------- > > Key: OPENJPA-1740 > URL: https://issues.apache.org/jira/browse/OPENJPA-1740 > Project: OpenJPA > Issue Type: Bug > Components: jdbc, kernel > Affects Versions: 2.1.0 > Reporter: Fay Wang > Assignee: Fay Wang > Fix For: 2.1.0 > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.