Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 27901 invoked from network); 7 Feb 2010 11:40:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Feb 2010 11:40:12 -0000 Received: (qmail 58499 invoked by uid 500); 7 Feb 2010 11:40:12 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 58478 invoked by uid 500); 7 Feb 2010 11:40:12 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 58468 invoked by uid 99); 7 Feb 2010 11:40:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Feb 2010 11:40:12 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msabo@buk.cvut.cz designates 147.32.104.6 as permitted sender) Received: from [147.32.104.6] (HELO sekvoj.buk.cvut.cz) (147.32.104.6) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Feb 2010 11:40:04 +0000 Received: from localhost (localhost [127.0.0.1]) by sekvoj.buk.cvut.cz (Postfix) with ESMTP id 98FB99B6A3 for ; Sun, 7 Feb 2010 12:39:42 +0100 (CET) Received: from sekvoj.buk.cvut.cz ([127.0.0.1]) by localhost (mail.buk.cvut.cz [127.0.0.1]) (amavisd-maia, port 10024) with LMTP id 07518-03 for ; Sun, 7 Feb 2010 12:39:39 +0100 (CET) Received: from [147.32.105.22] (antioch.buk.cvut.cz [147.32.105.22]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by sekvoj.buk.cvut.cz (Postfix) with ESMTPS id F29149B69A for ; Sun, 7 Feb 2010 12:39:38 +0100 (CET) Message-ID: <4B6EA67B.4030803@buk.cvut.cz> Date: Sun, 07 Feb 2010 12:39:39 +0100 From: =?UTF-8?B?TWFyZWsgxaBhYm8=?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1 MIME-Version: 1.0 To: user@cayenne.apache.org Subject: SQLResultMapping missing in RC2? Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard Hi all, I was using this chunk of code to return number of records in table: SQLTemplate sq = new SQLTemplate(User.class, "SELECT COUNT(id) C from User;"); SQLResultSetMapping rsMap = new SQLResultSetMapping(); rsMap.addColumnResult("C"); sq.setResultSetMapping(rsMap); Long users = (Long) DataObjectUtils.objectForQuery(getObjectContext(), sq); This code worked the whole way with cayenne 3 but after upgrade to rc2 (maven repo) the SQLResultSetMapping class is missing. Did you change some workflow and added alternative to this? If so then please could you provide it? Anyway, I find this piece of code rather colossal for simple procedure as count (I figure this is a common usecase) so is there an easier way to work with aggreagate functions? TIA, -- Marek Ĺ abo