From open-jpa-dev-return-1194-apmail-incubator-open-jpa-dev-archive=incubator.apache.org@incubator.apache.org Tue Nov 14 19:24:00 2006 Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 8777 invoked from network); 14 Nov 2006 19:23:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Nov 2006 19:23:59 -0000 Received: (qmail 66612 invoked by uid 500); 14 Nov 2006 19:24:09 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 66582 invoked by uid 500); 14 Nov 2006 19:24:09 -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 66573 invoked by uid 99); 14 Nov 2006 19:24:09 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2006 11:24:09 -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; Tue, 14 Nov 2006 11:23:57 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9658B7142D7 for ; Tue, 14 Nov 2006 11:23:37 -0800 (PST) Message-ID: <26002980.1163532217586.JavaMail.jira@brutus> Date: Tue, 14 Nov 2006 11:23:37 -0800 (PST) From: "Jakob Braeuchi (JIRA)" To: open-jpa-dev@incubator.apache.org Subject: [jira] Commented: (OPENJPA-81) Bad error message when trying to query a Collection relation using dot notation In-Reply-To: <26822780.1163449537696.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 [ http://issues.apache.org/jira/browse/OPENJPA-81?page=comments#action_12449737 ] Jakob Braeuchi commented on OPENJPA-81: --------------------------------------- hi marc, yes KategorieGruppe.kategorien is a collection and it's supported by both toplink and hibernate. if it's illegal, i'll have to rewrite the query. thanks jakob > Bad error message when trying to query a Collection relation using dot notation > ------------------------------------------------------------------------------- > > Key: OPENJPA-81 > URL: http://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 > 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 contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira