Hello,
I have a problem with caching:
Everytime I select a list of records from the database, these are cached by hibernate, as the following log excerpt underlines:
Code:
The query is already compiled, s
kipping...
2005-08-02 11:18:38,506 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] flushing session
2005-08-02 11:18:38,506 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] processing flush-time cascades
There is no exception thrown, but in fact, I don't get any results shown (in my web application)!
Reloading the site for a second time seems to mark the cache dirty and thus the query is re-compiled, so my results are shown again. Then reloading again leads to a blank page.
How can I avoid this?
I've alread set
hibernate.cache.use_query_cache to false.
But acutally I'm looking to a solution that uses cache (for performance reasons).
Hibernate version: 3 The generated SQL (show_sql=true): none generated because cachedDebug level Hibernate log excerpt:Code:
2005-08-02 11:18:38,505 DEBUG [org.hibernate.impl.SessionImpl] find: FROM Person p LEFT JOIN p.firma f
2005-08-02 11:18:38,505 DEBUG [org.hibernate.engine.QueryParameters] named parameters: {}
2005-08-02 11:18:38,506 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] compile() : The query is already compiled, s
kipping...
2005-08-02 11:18:38,506 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] flushing session
2005-08-02 11:18:38,506 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] processing flush-time cascades
2005-08-02 11:18:38,506 DEBUG [org.hibernate.engine.Cascades] processing cascade ACTION_SAVE_UPDATE for: com.mdpro.pro
tokolldb.models.Protokoll
2005-08-02 11:18:38,506 DEBUG [org.hibernate.engine.Cascades] cascade ACTION_SAVE_UPDATE for collection: com.mdpro.pro
tokolldb.models.Protokoll.protokollteilnehmer
2005-08-02 11:18:38,506 DEBUG [org.hibernate.engine.Cascades] done cascade ACTION_SAVE_UPDATE for collection: com.mdpr
o.protokolldb.models.Protokoll.protokollteilnehmer
2005-08-02 11:18:38,506 DEBUG [org.hibernate.engine.Cascades] deleting orphans for collection: com.mdpro.protokolldb.m
odels.Protokoll.protokollteilnehmer
2005-08-02 11:18:38,506 DEBUG [org.hibernate.engine.Cascades] done deleting orphans for collection: com.mdpro.protokol
ldb.models.Protokoll.protokollteilnehmer
2005-08-02 11:18:38,506 DEBUG [org.hibernate.engine.Cascades] cascade ACTION_SAVE_UPDATE for collection: com.mdpro.pro
tokolldb.models.Protokoll.tops
2005-08-02 11:18:38,506 DEBUG [org.hibernate.engine.Cascades] done cascade ACTION_SAVE_UPDATE for collection: com.mdpr
o.protokolldb.models.Protokoll.tops
2005-08-02 11:18:38,506 DEBUG [org.hibernate.engine.Cascades] deleting orphans for collection: com.mdpro.protokolldb.m
odels.Protokoll.tops
2005-08-02 11:18:38,506 DEBUG [org.hibernate.engine.Cascades] done deleting orphans for collection: com.mdpro.protokol
ldb.models.Protokoll.tops
2005-08-02 11:18:38,506 DEBUG [org.hibernate.engine.Cascades] done processing cascade ACTION_SAVE_UPDATE for: com.mdpr
o.protokolldb.models.Protokoll
2005-08-02 11:18:38,507 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] dirty checking collections
2005-08-02 11:18:38,507 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Flushing entities and processing
referenced collections
2005-08-02 11:18:38,507 DEBUG [org.hibernate.engine.Collections] Collection found: [com.mdpro.protokolldb.models.Proto
koll.protokollteilnehmer#1], was: [com.mdpro.protokolldb.models.Protokoll.protokollteilnehmer#1] (uninitialized)
2005-08-02 11:18:38,507 DEBUG [org.hibernate.engine.Collections] Collection found: [com.mdpro.protokolldb.models.Proto
koll.tops#1], was: [com.mdpro.protokolldb.models.Protokoll.tops#1] (uninitialized)
Does anyone has advice?