-->
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: data fetching technique
PostPosted: Thu Jan 28, 2010 11:12 am 
Newbie

Joined: Thu Jan 28, 2010 10:49 am
Posts: 5
hi sir/madam,

i'm using version 2.1.2 and new in nhibernate which just started to get hands on it with NHibernate books, i .have a doubts regards record fetching technique and session caching. from my understanding, i can read record with following technique and it will stored the entity into session cache.

1. Linq, IQueryable or IEnumerable
2. Session.Get,Session.Load,Session.Find,Session.List, Session.CreateQuery and Session.CreateCriteria

but at times i dont want to cache the entity for read only record and performance concern, how can i achieve by not to cache the entity when reading the record from database?

about the Session.CreateQuery, i noticed that if i call it multiple times for the same query and result, it will issued select SQL to database each time i call Session.CreateQuery, why didn't it retrieve record from cache after 1st read??

many thanks.
regards


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.