Return-Path: X-Original-To: apmail-cayenne-dev-archive@www.apache.org Delivered-To: apmail-cayenne-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 5444C9999 for ; Tue, 31 Jan 2012 20:31:49 +0000 (UTC) Received: (qmail 45321 invoked by uid 500); 31 Jan 2012 20:31:49 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 45278 invoked by uid 500); 31 Jan 2012 20:31:48 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 45269 invoked by uid 99); 31 Jan 2012 20:31:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jan 2012 20:31:48 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of johnthuss@gmail.com designates 209.85.216.50 as permitted sender) Received: from [209.85.216.50] (HELO mail-qw0-f50.google.com) (209.85.216.50) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jan 2012 20:31:43 +0000 Received: by qabg27 with SMTP id g27so476606qab.16 for ; Tue, 31 Jan 2012 12:31:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=TBjzJ/JVvX/HECbGLHAQRym0TzBwrgpyaOtV+lV2VGE=; b=Wc4s3yoysAs37yeUD/x11lLya5St2S8MsJ1Ft14YTbBqqVJ/xwRy6kN2LaK+m683QV GtUXUluZhHaJyTBev1LTK4m30z+nXyZwIpeBnBvxsCIt54w8jtsBttBPIzQWQnQZxuRT YKNVejmBQ5fhks3eV1W38b82qAD7Ot3bAAom0= MIME-Version: 1.0 Received: by 10.224.33.66 with SMTP id g2mr19083217qad.71.1328041882713; Tue, 31 Jan 2012 12:31:22 -0800 (PST) Received: by 10.229.90.202 with HTTP; Tue, 31 Jan 2012 12:29:55 -0800 (PST) In-Reply-To: References: <4F21F7B6.1060608@maniatis.org> <032F84BE-64D5-4A57-BAE1-AF5305ACFEA1@objectstyle.org> <06821908-6D16-4F8E-8FB8-21B170FE7654@objectstyle.org> <12C6EB01-FFD9-4F36-84B6-94B608A1D6CF@objectstyle.org> <4F267D30.7020904@maniatis.org> <4F268839.9040604@maniatis.org> Date: Tue, 31 Jan 2012 14:29:55 -0600 Message-ID: Subject: Re: SelectQuery + Orderings From: John Huss To: "dev@cayenne.apache.org" Content-Type: multipart/alternative; boundary=20cf3074b586aa7c9604b7d8d842 --20cf3074b586aa7c9604b7d8d842 Content-Type: text/plain; charset=ISO-8859-1 Well, if your code is well designed your artist fetch logic is probably in the Artist class so the class name isn't needed. If you are doing something inside the class you can use a static import to move all the artist stuff into the namespace and then use it without qualification. On Tuesday, January 31, 2012, Durchholz, Joachim < Joachim.Durchholz@hennig-fahrzeugteile.de> wrote: >> You can also generate a path builder class so you can >> do the same thing for related objects too. For example: >> >> Artist.NAME.eq("Picasso") // equals >> Artist.DATE_OF_BIRTH.lt(now()) // less than > > Having to repeat Artist. all over the place is exactly what I'd like to get rid of. > > Hmm... > ... > ... I see it's hard to see whether that's actually a problem or not. > I see myself arguing on matters of principle, which is nice but risks failure when confronted with reality. > I also see John arguing with small examples, which is nice but risks failure when trying to scale to complicated queries. > > How about if everybody with an interest in the topic scour their projects for the nastiest SQL that they have, and present them here? > We'd have a set of use cases that will really test the various approaches. > > Regards > Jo > --20cf3074b586aa7c9604b7d8d842--