Well... 2 sessions 2 UoW and NH2.1 are working as expected.My interpretation
is: User fault and bug, introduced in NH2.0, fixed in NH2.1.
A WARN for an expected behavior is unneeded and there is an high probability
that the fixing is documented in the NH2.1.0"release-notes" available on
JIRA.

2009/2/12 Ayende Rahien <[email protected]>

> no cache involved
>
>
> On Thu, Feb 12, 2009 at 3:19 PM, Fabio Maulo <[email protected]> wrote:
>
>> hmmmm with or with out the cache setting ?
>>
>> 2009/2/12 Ayende Rahien <[email protected]>
>>
>>  What should the following code do?
>>> using (var session1 = sessions.OpenSession())
>>> using (var tx1 = session1.BeginTransaction())
>>> {
>>>
>>>     using (var session2 = sessions.OpenSession())
>>>     using (var tx2 = session2.BeginTransaction())
>>>     {
>>>         var employee = session2.Load<Employee>(1);
>>>         Assert.IsFalse(session1. Contains(employee));
>>>         Assert.IsTrue(session2.Contains(employee));
>>>
>>>         session1.Evict(employee);
>>>
>>>         Assert.IsFalse(session1.Contains(employee));
>>>
>>>         Assert.IsTrue(session2.Contains(employee));
>>>
>>>         tx2.Commit();
>>>     }
>>>
>>>     tx1.Commit();
>>> }
>>>
>>> In 1.2 & 2.1, it pass.
>>> In 2.0, it fails with KeyNotFoundException
>>>
>>> To me, this is a bug in the user code.
>>> The question is, should we try to warn about this? Or should we ignore
>>> it?
>>>
>>
>>
>>
>> --
>> Fabio Maulo
>>
>
>


-- 
Fabio Maulo

Reply via email to