I am developing a windows forms application and I am using a singleton Session to make my queries, inserts, etc, in order to avoid many connections to the database, but there is a problem when another user using the application makes an update on db, my entity becomes lagged, it stays stored in the session in a previous state.
How can I make hibernate don't look in cache but always in database?
The following search is bringing lagged entities from cache:
Code:
session.CreateCriteria(typeof(obj)).List()
How to make always search straightly on database bypassing the cache layer?
thanks