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 E584610598 for ; Wed, 10 Jul 2013 16:09:11 +0000 (UTC) Received: (qmail 82646 invoked by uid 500); 10 Jul 2013 16:09:11 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 82621 invoked by uid 500); 10 Jul 2013 16:09:11 -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 82613 invoked by uid 99); 10 Jul 2013 16:09:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 16:09:11 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rmannibucau@gmail.com designates 209.85.128.178 as permitted sender) Received: from [209.85.128.178] (HELO mail-ve0-f178.google.com) (209.85.128.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 16:09:07 +0000 Received: by mail-ve0-f178.google.com with SMTP id pb11so6070154veb.23 for ; Wed, 10 Jul 2013 09:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=xc656i+8cH3JFbuHv17zawN9bg34KAfwQq/eivbydzU=; b=x6pGciPlxd0CoeT6C4kT2jVZxWiz4nruS0gAHDNkCccGY4iSn2mLT1009o445J94H2 Zhb/X+bwk3QNtR512AMoZ8KgpJ0uy2QDc0q/U1+pbLzR0KK40AFFt0eQymNW6NVhleeo AC8uOmSp4GgHuYGA+O+hyzhLhUppI4eQJqQ8/UKg3UmdDB1j9vjEicjAgcmeECMgxka5 0MHaDJN4MEaeADk+TxEhI5+bZS4jTolb2uUudcHq4ML6q2lZ1H1YChYkJ8kcmgHwrx2Y ehwaSvPuxGLQueVZ+vhXGOR6t3FsOMlqP4oC50EfAzSZuPpD6sn48sVl1jp4hVaPdBrf vB9A== X-Received: by 10.220.143.140 with SMTP id v12mr19423982vcu.95.1373472526924; Wed, 10 Jul 2013 09:08:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.209.3 with HTTP; Wed, 10 Jul 2013 09:08:26 -0700 (PDT) In-Reply-To: References: From: Romain Manni-Bucau Date: Wed, 10 Jul 2013 18:08:26 +0200 Message-ID: Subject: Re: L2 cache && em.find()? To: dev@openjpa.apache.org Content-Type: multipart/alternative; boundary=047d7b342f4413bd6e04e12a7e60 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b342f4413bd6e04e12a7e60 Content-Type: text/plain; charset=ISO-8859-1 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/* *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* > --047d7b342f4413bd6e04e12a7e60--