Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 24955 invoked from network); 13 Nov 2006 18:18:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2006 18:18:26 -0000 Received: (qmail 71194 invoked by uid 500); 13 Nov 2006 18:18:36 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 71183 invoked by uid 99); 13 Nov 2006 18:18:36 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2006 10:18:36 -0800 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 [212.239.26.100] (HELO horus.dnshighspeed.com) (212.239.26.100) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2006 10:18:22 -0800 Received: from net84-253-140-179.mclink.it ([84.253.140.179] helo=zion) by horus.dnshighspeed.com with esmtpa (Exim 4.52) id 1GjgNR-00087m-VJ; Mon, 13 Nov 2006 19:17:50 +0100 From: "Luca Garulli" To: , "'JDO Expert Group'" Subject: R: IN operator missed? Date: Mon, 13 Nov 2006 19:17:47 +0100 Organization: Orient Technologies MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Thread-Index: AccHRx1cONA/OzV8TV2eV6IlUVel2QAB8tZw In-Reply-To: <1163438013.4558a7bd31cf8@webmail.jpox.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - horus.dnshighspeed.com X-AntiAbuse: Original Domain - db.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - orientechnologies.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20061113181825.BC54A10FB011@herse.apache.org> Hi, Tested with JPOX and effectly works! I'd had a look round in my memory, in the JPOX, Solarmetric = documentation and a fast look also in JDO spec, but I didn't find any use case like = mine. Thanks, Bye Luca -----Messaggio originale----- Da: Erik Bengtson [mailto:erik@jpox.org]=20 Inviato: luned=EC 13 novembre 2006 18.14 A: 'JDO Expert Group'; jdo-dev@db.apache.org Oggetto: Re: IN operator missed? Why not? Have you tried with JPOX ? Quoting Luca Garulli : > Hi, > Working in real-world applications using JDO 2.0 I beware about the=20 > SQL IN equivalend operator missed by spec. An example: > > public class Questionnaire{ > ... > private Employee employee; > ... > } > > I'd like to get any Questionnaire instances for the following = employee: > Luca, Robert and Chris. The CONTAINS operator works only on=20 > collection, but it could be useful to execute a query like this: > > List list=3D new ArrayList(); // LET'S THINK=20 > E1-E2-E3 are loaded before List.add( e1 ); List.add( e2 ); List.add(=20 > e3 ); > > Query query =3D iManager.newQuery(); > query.setClass( Questionnaire.class ); query.setFilter(=20 > "list.contains( employee )" ); query.declareVariables(=20 > "java.util.Collection list" ); query.execute( list ); > > JDO implementation should translate the query by using SQL IN operator = > and the OID of Employee objects contained in the LIST collection=20 > passed as parameter. > > What do you think? > > Bye, > Luca Garulli > CTO of Asset Data srl > www.RomaFramework.org > >