Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 87292 invoked from network); 13 Oct 2006 13:58:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Oct 2006 13:58:28 -0000 Received: (qmail 42638 invoked by uid 500); 13 Oct 2006 13:58:27 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 42610 invoked by uid 500); 13 Oct 2006 13:58:26 -0000 Mailing-List: contact cayenne-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cayenne-user@incubator.apache.org Delivered-To: mailing list cayenne-user@incubator.apache.org Received: (qmail 42600 invoked by uid 99); 13 Oct 2006 13:58:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Oct 2006 06:58:26 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [64.124.179.102] (HELO polatsk.objectstyle.org) (64.124.179.102) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 13 Oct 2006 06:58:25 -0700 Received: (qmail 30520 invoked from network); 13 Oct 2006 13:58:04 -0000 Received: from unknown (HELO ?::?????IPv6:::1?) (127.0.0.1) by localhost with SMTP; 13 Oct 2006 13:58:04 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <72A371C6-744E-45B4-BAEB-7CEDC7D396C4@objectstyle.org> Content-Transfer-Encoding: quoted-printable From: Andrus Adamchik Subject: Re: How to use RelationshipQuery? Date: Fri, 13 Oct 2006 09:58:05 -0400 To: cayenne-user@incubator.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Arturo, Not quite sure what problem you are trying to solve, but I can =20 comment on RelationshipQuery. RelationshipQuery is used by Cayenne =20 internally to resolve relationships. Applications rarely create it =20 directly, but there is no problem if you do: http://cwiki.apache.org/CAYDOC/relationshipquery.html Ignore the EntityResolver methods, as those are just callbacks that =20 are invoked by Cayenne when the query is executed. Just for the =20 reference, EntityResolver is a logical analog of EOF EOModelGroup - =20 it provides a single combined namespace for mapping metadata and is =20 accessible via ObjectContext|DataContext.getEntityResolver(). Andrus On Oct 12, 2006, at 11:58 PM, Arturo P=E9rez wrote: > Hi all, > > I was trying to populate some Click CayenneForm things. Coming =20 > from an > EOF world, I prefer to traverse relationships rather than run queries. > But many (all?) of the Click Cayenne integrations require =20 > SelectQuery to > function. In looking around for a way to bridge this divide, I =20 > stumbled > across the RelationshipQuery thing in Cayenne 1.2. But I couldn't > figure out how to use it. What's an EntityResolver? How do I get =20 > one? > How do I convert a RelationshipQuery into a SelectQuery? Is this =20 > even a > sensible way to approach the problem? > > An example use of the RelationshipQuery or a better suggestion =20 > would be > much appreciated, > > tia, > arturo > >