-->
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.  [ 2 posts ] 
Author Message
 Post subject: cache issue and suggestion
PostPosted: Tue Jun 20, 2006 10:57 am 
Newbie

Joined: Tue Jun 20, 2006 10:45 am
Posts: 1
Location: italy
i'm trying to use http://www.castleproject.org/index.php/ActiveRecord because it save me from creating xml mapping file.

FIRST QUESTION
i'm not able to use second level cache, i enbled it but i continue to see sql queries to db (using MSSQL Profiler). Some one can suggest a simple working example on how to use cache with nhibernate ?

SECOND QUESTION
reading this forum i saw code like this:

Code:
[Class(Table = "`sample`")]
public partial class @Sample
{
    [Cache(Usage = CacheUsage.ReadWrite)]
    private Type someField/Property;
}


how is it made ? Using something from nhibernate.contrib ? someone has reference ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 20, 2006 11:17 am 
Expert
Expert

Joined: Fri May 13, 2005 5:56 pm
Posts: 308
Location: Santa Barbara, California, USA
queries need to have their own cache enabled. check out the documentation here:

http://www.hibernate.org/hib_docs/nhibe ... querycache

-devon


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

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.