On 08 Aug (13:05), Craig McElroy wrote: > I am in the process of migrating a project from OJB to Hibernate 2.0.2. > Hibernate is currently configured to use JDBC transactions and no > caching. I have encountered a scenario where I have a Hibernate > Session open for a period of time doing only reads. After having > loaded the contents of a given table, one of the records is modified > from an additional Hibernate Session elsewhere. After the modification > is saved (and I have confirmed that the changes where persisted by > looking at the db), a query by the read session will still return the > original values. A simplified example containing both the persistable > object and a main() to test it follows.
This is expected behaviour. The Session is a cache of objects for one Unit of Work. Don't keep it open longer than absolutely necessary. -- Christian Bauer [EMAIL PROTECTED] ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel