openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject L2 cache && em.find()?
Date Wed, 10 Jul 2013 15:33:49 GMT
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 <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message