openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Bauer <techhu...@gmail.com>
Subject Re: QueryCacheImpl question
Date Tue, 19 Oct 2010 16:47:41 GMT
Hi Mark,

OpenJPA has a query result cache (QueryCache) for caching full query results
and a SQL query cache (QuerySQLCache) for caching SQL queries. You've
disabled the QueryCache (which is actually disabled by default).  I believe
the bug you've hit is in the query SQL cache.  Try disabling the query SQL
cache via:

<property name="openjpa.jdbc.QuerySQLCache" value="false"/>

hth,
-Jeremy

On Tue, Oct 19, 2010 at 11:35 AM, Mark Struberg <struberg@yahoo.de> wrote:

> Hi!
>
> I have a problem with upgrading from OpenJPA-2.0.0 to 2.0.1.
>
> One of my services executes the following query (this is the 'id' I get in
> PreparedQueryCacheImpl#get(String id) ):
>
> SELECT distinct e FROM Employment em, Person e WHERE em.employeeId =
> e.employeeId and em.orgUnitCode = :orgUnitCode AND em.employmentPosition in
> (:employmentPositions) AND em.start <= :startBefore AND em.end >= :endAfter
> ORDER BY e.familyName ASC
>
> Somehow when I execute my service a few times with different
> employmentPositions params (ArrayList<String>) I still get the 'old' cached
> param values!
>
> I tried to disable this behaviour in my persistence.xml with
>
>  <property name="openjpa.QueryCache" value="false"/>
>
> but this didn't work.
>
> Maybe this was a side effect of the ORDER BY which made this query work in
> 2.0.0 (caching of queries with ORDER BY got only fixed after 2.0.0), so I'd
> like to write a unit test for it.
> Imo it's not that easy to cache queries with a select IN, wdyt?
>
>
> keep u updated, but feel free to ping me if this is a known issue ...
>
> txs and LieGrue,
> strub
>
>
>
>

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