-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to disable caching on entity level.
PostPosted: Mon Oct 13, 2008 7:35 am 
Newbie

Joined: Mon Oct 13, 2008 6:58 am
Posts: 1
Hello,

i am using EhCahce (org.hibernate.cache.EhCacheProvider) as a second level cache and i configured caching using custom ehcache.xml file.
As my application can operate in 2 modes, one entity should be cached in "write" mode and should NOT be cached id "read-only" mode.

I want that MyEntity.hbm.xml is same in both cases but the ehcahe.xml configuration is different. In the "write" mode, everything works fine, but how can i configure through ehcache.xml, that MyEntity is not cached?
I tried to remoe it from ehcache.xml but EhCacheProvider takes the dafault for this entity.

Thank you very much for any hint.
Lubos

Hibernate version: 3.2.3.ga

Mapping documents:
MyEntity.hbm.xml
<hibernate-mapping package="...">
<class name="MyEntity" table="..." schema="..." abstract="false" lazy="true">
<cache usage="read-write" />
...
</hibernate-mapping package>


Name and version of the database you are using:Oracle 10 g


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.