I’m developing a web application with VP, but some annoying problems occurring continuously.
Although I selected “disable cache” from cache options section, when I insert or modify a row in DB hibernate always give me a cached version of object.
How can I disable this cache?
P.S.: I’m using VP Version 6.1 build 20070821e for linux
The cache option is used for defined the second-level cache, which is used for cross-session. What hibernate provided is a first-level cache. It means that the loaded/saved object will be cached in the session.
In order to force the session to load an object from the database, you can using session.clear() or session.evict(object)
unfortunately it seems there is no clear under session of NHibernate (unlike hibernate)
is It the same thing if I use close rather than clear?
I’ll discuss with our engineers and then get back to you asap.
We’ve added the Clear() method for session object. Please download the patch at:
Please install it by overwriting the current installation. Then, generate ORM code again. The generated code will have the problem fixed.
this time I have a clean conscience, I remembered to tell you that I’m using linux version (see first post)
Could you send me a linux version?
Thanks in advance