I haved browsed the documentation and forums and can't find an anwser to this question so I was wondering if someone could help me.
I am developing a WinForms application which is storing the Session in a singleton for the life of the application. I call the following code on PC A:
Code:
public static IList RetrieveAllCustomers()
{
return Database.Session.Find("from Customer c order by c.CustomerId asc");
}
This loads all my customers up correctly.
I then open the app on PC B and insert a new customer. I go back to PC A and call the above code again which correctly returns the new row. However, if I do an update on an existing instance from PC B and then call the retrieve all from PC A the update is not retrieved. I am using the <version> tag btw.
Checking the NHibernate (V1.0.2.0) code (Loader.cs) it seems that NHib just checks whether the object is loaded ; if it is then it just uses that instance otherwise it creates a new instance (i.e. it only picks up new rows).
Am I missing the point here but shouldn't it also check that the versions are the same seeing that it has done the hard work by getting all the rows from the database anyway?
Thanks