From dev-return-19714-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Tue Nov 22 14:53:01 2011 Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4BF0A9546 for ; Tue, 22 Nov 2011 14:53:01 +0000 (UTC) Received: (qmail 73315 invoked by uid 500); 22 Nov 2011 14:53:01 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 73289 invoked by uid 500); 22 Nov 2011 14:53: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 73281 invoked by uid 99); 22 Nov 2011 14:53:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 14:53:01 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 14:53:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DC99E9779D for ; Tue, 22 Nov 2011 14:52:39 +0000 (UTC) Date: Tue, 22 Nov 2011 14:52:39 +0000 (UTC) From: "Jacob Nowosatka (Closed) (JIRA)" To: dev@openjpa.apache.org Message-ID: <703897653.2725.1321973559905.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (OPENJPA-81) Bad error message when trying to query a Collection relation using dot notation 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-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacob Nowosatka closed OPENJPA-81. ---------------------------------- Resolution: Not A Problem Assignee: Jacob Nowosatka Closing this issue because this the query is illegal and there is no issue with OpenJPA. Thanks > Bad error message when trying to query a Collection relation using dot notation > ------------------------------------------------------------------------------- > > Key: OPENJPA-81 > URL: https://issues.apache.org/jira/browse/OPENJPA-81 > Project: OpenJPA > Issue Type: Improvement > Components: diagnostics, query > Environment: openJPA 0.9.7 > MySQL 5.0.15 > Reporter: Jakob Braeuchi > Assignee: Jacob Nowosatka > Priority: Minor > > the query over the 1:n relationship 'katergorien' > em.createQuery("select distinct k from KategorieGruppe k " + > "where k.kategorien.bezeichnung like ?1 " + > "order by k.bezeichnung asc"); > uses a wrong alias t2 in the generated SQL: > SELECT DISTINCT t0.id, t0.bezeichnung FROM ekv2kategoriegruppe t0 INNER JOIN ekv2kategorie t1 ON t0.id = t1.idGruppe WHERE (t2.bezeichnung LIKE ? ESCAPE '\\') ORDER BY t0.bezeichnung ASC [params=(String) F%] > Unknown column 't2.bezeichnung' in 'where clause' -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira