Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-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 7FABB105E4 for ; Wed, 10 Jul 2013 16:19:51 +0000 (UTC) Received: (qmail 4444 invoked by uid 500); 10 Jul 2013 16:19:50 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 4282 invoked by uid 500); 10 Jul 2013 16:19:50 -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 4127 invoked by uid 99); 10 Jul 2013 16:19:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 16:19:49 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of curtisr7@gmail.com designates 209.85.219.44 as permitted sender) Received: from [209.85.219.44] (HELO mail-oa0-f44.google.com) (209.85.219.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 16:19:44 +0000 Received: by mail-oa0-f44.google.com with SMTP id l10so10001777oag.3 for ; Wed, 10 Jul 2013 09:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=0ULRx1TNga2lRL1Cg4+FoDxCbMvG/OnU3ijw2QMPzp0=; b=iMevwR1LqOVPuviQwmt3xXhbdCapSlY9Sb2RrJ6Ie3aGuoJjb3wCORiYzhWb0/lyDn MLcV3oFNrqqWmBC8KQIivKhGW0JVuKP9bEjxkJIw8oVrDi0KPWj6fTKbCapbgrSy4GVH kBVzZijVh+v5n2QgI1ZpwskIgFkf0h3dPKqNRDzd2FCmEEf2zfN3XKWonPG3Yef0AxGw 9afhdewhOgjHnbjpAyRk9cBJ1M06SjQ0ET6SK7mR8d6PrSzElQ0ouNbsAgdcOQ9KYimK +jMfqSKlX+XPmY8gonqyvQXIUFKSR70ZCkfgaJwM8+4EKL63LeUXxfq5Aw5aUikJCxpQ APUQ== MIME-Version: 1.0 X-Received: by 10.182.176.34 with SMTP id cf2mr28621178obc.45.1373473163257; Wed, 10 Jul 2013 09:19:23 -0700 (PDT) Received: by 10.60.119.103 with HTTP; Wed, 10 Jul 2013 09:19:23 -0700 (PDT) In-Reply-To: References: Date: Wed, 10 Jul 2013 11:19:23 -0500 Message-ID: Subject: Re: L2 cache && em.find()? From: Rick Curtis To: dev@openjpa.apache.org Content-Type: multipart/alternative; boundary=e89a8ff1cf82013fd604e12aa4b8 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8ff1cf82013fd604e12aa4b8 Content-Type: text/plain; charset=ISO-8859-1 I actually reverted the changes from 2.3.0 and 2.2.2 (I'll change the fix versions field) because the change wasn't kosher with regards to the spec. On Wed, Jul 10, 2013 at 11:08 AM, Romain Manni-Bucau wrote: > Not the same case since i'm in eager mode for the relationship and it still > doesn't work on the 2.3.0-SNAPSHOT > > *Romain Manni-Bucau* > *Twitter: @rmannibucau * > *Blog: **http://rmannibucau.wordpress.com/*< > http://rmannibucau.wordpress.com/> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > *Github: https://github.com/rmannibucau* > > > > 2013/7/10 Rick Curtis > > > I'm not 100% certain that I'm following your scenario, but I worked on a > > JIRA[1] a while back that sounds pretty similar. > > > > [1] https://issues.apache.org/jira/browse/OPENJPA-2285 > > > > Thanks, > > Rick > > > > > > On Wed, Jul 10, 2013 at 10:33 AM, Romain Manni-Bucau > > wrote: > > > > > Hi, > > > > > > with a colleague we noticed today this behavior: > > > > > > 1) we activated the L2 cache > > > 2) we have an entity Foo with a relationship 1-n in eager mode > > > 3) we test the cache is correctly use > > > a) we call em.find(Foo.class, id) -> entity is cached but not the > > > relationship so a query is generated for each find > > > b) if we replace the em.find() by a query "select by id" all works > > > fine (cache is used and we don't see any query then) > > > > > > > > > Any idea? > > > > > > *Romain Manni-Bucau* > > > *Twitter: @rmannibucau * > > > *Blog: **http://rmannibucau.wordpress.com/*< > > > http://rmannibucau.wordpress.com/> > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > > > *Github: https://github.com/rmannibucau* > > > > > > > > > > > -- > > *Rick Curtis* > > > -- *Rick Curtis* --e89a8ff1cf82013fd604e12aa4b8--