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 D564871F5 for ; Sun, 18 Sep 2011 11:04:21 +0000 (UTC) Received: (qmail 33367 invoked by uid 500); 18 Sep 2011 11:04:21 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 33346 invoked by uid 500); 18 Sep 2011 11:04:21 -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 33338 invoked by uid 99); 18 Sep 2011 11:04:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Sep 2011 11:04:21 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [59.167.240.32] (HELO fish.ish.com.au) (59.167.240.32) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Sep 2011 11:04:16 +0000 Received: from [10.29.62.3] (port=64991 helo=Aris-MacBook-Pro.local) by fish.ish.com.au with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76) (envelope-from ) id 1R5FA6-00005N-23 for dev@cayenne.apache.org; Sun, 18 Sep 2011 21:03:50 +1000 X-CTCH-RefID: str=0001.0A150201.4E75D016.0119,ss=1,re=0.000,fgs=0 Message-ID: <4E75D017.9000409@maniatis.org> Date: Sun, 18 Sep 2011 21:03:51 +1000 From: Aristedes Maniatis User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: dev@cayenne.apache.org Subject: Re: Type safe queries & more References: <4E42DE88-4245-4573-BB24-7AF9649DD6A8@karlmenn.is> <4E731879.4080106@maniatis.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit On 16/09/11 8:23 PM, Atli P�ll Hafsteinsson wrote: > For me a big part of the reason for implementing this is to get rid of > text based queries as they cannot be verified and therefore error > prone. Plus you have to know more about the data structure. It is possible to have both and still create at this clean chained API. This is already possible in Cayenne today (EJBQL style queries compared to regular Cayenne expressions). Other ORMS (like ActiveRecord in Rails [1] ) also support this dual approach, and I've found it quite useful to be able to mix them as the need arises. Ari [1] http://guides.rubyonrails.org/active_record_querying.html (Note the ":clients" syntax is as close as Ruby gets to enumerations or keys, given that the entire language is untyped). -- --------------------------> Aristedes Maniatis GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A