Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 47000 invoked from network); 15 Feb 2010 18:08:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Feb 2010 18:08:30 -0000 Received: (qmail 16685 invoked by uid 500); 15 Feb 2010 16:21:50 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 16612 invoked by uid 500); 15 Feb 2010 16:21:49 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 16602 invoked by uid 99); 15 Feb 2010 16:21:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2010 16:21:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2010 16:21:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DFFE3234C045 for ; Mon, 15 Feb 2010 08:21:27 -0800 (PST) Message-ID: <240114056.281511266250887903.JavaMail.jira@brutus.apache.org> Date: Mon, 15 Feb 2010 16:21:27 +0000 (UTC) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-1511) Executing a cached query doesn't properly cache results after DataCache eviction MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Executing a cached query doesn't properly cache results after DataCache eviction -------------------------------------------------------------------------------- Key: OPENJPA-1511 URL: https://issues.apache.org/jira/browse/OPENJPA-1511 Project: OpenJPA Issue Type: Bug Affects Versions: 2.0.0-beta Reporter: Rick Curtis Attachments: TestCache.java When doing some testing I found that the QueryCache sometimes doesn't put results into the DataCache. I haven't had time to debug the problem, but I'm opening this JIRA so I can attach the test case I've created. The test scenario is as follows: String query = "Select t FROM Item t where 1=1 ORDER BY t.id"; items = em.createQuery(query,Item.class).getResultList(); assertTrue(storeCache.contains(Item.class, items.get(0).getId())); // Make sure that all of the results are in the DataCache. for(Item o : items){ assertTrue(storeCache.contains(Item.class, o.getId())); } storeCache.evict(Item.class,items.get(0).getId()); // Evict one result assertFalse(storeCache.contains(Item.class,items.get(0).getId())); // Executing the same query should re-populate the datacache items = em.createQuery(query,Item.class).getResultList(); assertTrue(storeCache.contains(Item.class, items.get(0).getId())); // fails here -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.