Return-Path: X-Original-To: apmail-cayenne-commits-archive@www.apache.org Delivered-To: apmail-cayenne-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 72E1F17D57 for ; Sun, 5 Oct 2014 14:04:34 +0000 (UTC) Received: (qmail 3054 invoked by uid 500); 5 Oct 2014 14:04:34 -0000 Delivered-To: apmail-cayenne-commits-archive@cayenne.apache.org Received: (qmail 3035 invoked by uid 500); 5 Oct 2014 14:04:34 -0000 Mailing-List: contact commits-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 commits@cayenne.apache.org Received: (qmail 3025 invoked by uid 99); 5 Oct 2014 14:04:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Oct 2014 14:04:34 +0000 Date: Sun, 5 Oct 2014 14:04:33 +0000 (UTC) From: "Andrus Adamchik (JIRA)" To: commits@cayenne.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (CAY-1958) SelectById - a new full-featured select query to get objects by id MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAY-1958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrus Adamchik closed CAY-1958. -------------------------------- Resolution: Fixed > SelectById - a new full-featured select query to get objects by id > ------------------------------------------------------------------ > > Key: CAY-1958 > URL: https://issues.apache.org/jira/browse/CAY-1958 > Project: Cayenne > Issue Type: Task > Reporter: Andrus Adamchik > Assignee: Andrus Adamchik > Fix For: 3.2.M2 > > > This is to fill the gap left between ObjectIdQuery (hard to use, odd caching model, no generics support, intended for internal use) and Cayenne.objectForPk() (hardcoded caching model , not a query): > Artist a = SelectById.query(Artist.class, 3).useLocalCache("artists").selectOne(context); > Note on caching... this hits query cache instead of object cache, so until we merge the two this may result in extra DB trips for the objects that we already have resolved. I guess that's the price to pay for consistency. -- This message was sent by Atlassian JIRA (v6.3.4#6332)