From dev-return-4507-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Mon Jun 11 15:27:13 2007 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 24984 invoked from network); 11 Jun 2007 15:27:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jun 2007 15:27:12 -0000 Received: (qmail 58473 invoked by uid 500); 11 Jun 2007 15:27:15 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 58450 invoked by uid 500); 11 Jun 2007 15:27:15 -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 58441 invoked by uid 99); 11 Jun 2007 15:27:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2007 08:27:15 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [147.91.1.120] (HELO afrodita.rcub.bg.ac.yu) (147.91.1.120) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2007 08:27:11 -0700 Received: from [147.91.4.66] (ognjen-pc.rcub.bg.ac.yu [147.91.4.66]) by afrodita.rcub.bg.ac.yu (Postfix) with ESMTP id 3268B1601E5 for ; Mon, 11 Jun 2007 17:26:22 +0200 (CEST) Message-ID: <466D699D.9090103@etf.bg.ac.yu> Date: Mon, 11 Jun 2007 17:26:21 +0200 From: Ognjen Blagojevic User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: dev@openjpa.apache.org Subject: Newbie question: Subselect with MySQL Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-RCUB-MailScanner-Information: Please contact the RCUB if you have problem with mail X-RCUB-MailScanner: Found to be clean X-RCUB-MailScanner-From: ognjen@etf.bg.ac.yu X-Virus-Checked: Checked by ClamAV on apache.org Hello, I am new to OpenJPA, and I have a question regarding subselects. When I try to invoke an EJB QL query like this: select p from Person p where p.id in (select st.idPerson.id from Student st) I get the following exception: Exception in thread "main" <0.9.7-incubating fatal general error> org.apache.openjpa.persistence.PersistenceException: The database dictionary in use ("class org.apache.openjpa.jdbc.sql.MySQLDictionary") reports that it does not have feature "SupportsSubselect". This feature is needed to complete the current operation. To force OpenJPA to try to use the feature anyway, set the following property: openjpa.jdbc.DBDictionary: SupportsSubselect= at ... I'm using MySQL 4.1.16, which have subselect support, and writing this query in native SQL is easy. How can I use subselects with OpenJPA and EJB QL? Thanks, Ognjen