|
From: <fab...@us...> - 2009-10-31 15:26:32
|
Revision: 4810
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4810&view=rev
Author: fabiomaulo
Date: 2009-10-31 15:26:23 +0000 (Sat, 31 Oct 2009)
Log Message:
-----------
Merge r4809 (fix NH-2000)
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs
trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj
Added Paths:
-----------
trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/
trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/DomainClass.cs
trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/Mappings.hbm.xml
trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/SampleTest.cs
Modified: trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs 2009-10-31 15:22:21 UTC (rev 4809)
+++ trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs 2009-10-31 15:26:23 UTC (rev 4810)
@@ -2238,7 +2238,9 @@
using (new SessionIdLoggingContext(SessionId))
{
CheckAndUpdateSessionStatus();
- return enabledFilters[filterName];
+ IFilter result;
+ enabledFilters.TryGetValue(filterName, out result);
+ return result;
}
}
Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/DomainClass.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/DomainClass.cs (rev 0)
+++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/DomainClass.cs 2009-10-31 15:26:23 UTC (rev 4810)
@@ -0,0 +1,9 @@
+namespace NHibernate.Test.NHSpecificTest.NH2000
+{
+ public class DomainClass
+ {
+ public int Id { get; set; }
+
+ public byte[] ByteData { get; set; }
+ }
+}
Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/Mappings.hbm.xml
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/Mappings.hbm.xml (rev 0)
+++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/Mappings.hbm.xml 2009-10-31 15:26:23 UTC (rev 4810)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
+ assembly="NHibernate.Test"
+ namespace="NHibernate.Test.NHSpecificTest.NH2000"
+ default-lazy="false">
+ <class name="DomainClass">
+ <id name="Id">
+ <generator class="assigned" />
+ </id>
+ <property name="ByteData" />
+ <filter name="TestFilter" condition="True"></filter>
+ </class>
+ <filter-def name="TestFilter">
+ </filter-def>
+</hibernate-mapping>
Added: trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/SampleTest.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/SampleTest.cs (rev 0)
+++ trunk/nhibernate/src/NHibernate.Test/NHSpecificTest/NH2000/SampleTest.cs 2009-10-31 15:26:23 UTC (rev 4810)
@@ -0,0 +1,19 @@
+using NUnit.Framework;
+
+namespace NHibernate.Test.NHSpecificTest.NH2000
+{
+ [TestFixture]
+ public class SampleTest : BugTestCase
+ {
+ // In this version of nHibernate, GetEnabledFilter throws an exception
+ // instead returning nothing like in previous versions.
+ [Test]
+ public void TestSessionGetEnableFilter()
+ {
+ using (ISession session = OpenSession())
+ {
+ IFilter filter = session.GetEnabledFilter("TestFilter");
+ }
+ }
+ }
+}
Modified: trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-10-31 15:22:21 UTC (rev 4809)
+++ trunk/nhibernate/src/NHibernate.Test/NHibernate.Test.csproj 2009-10-31 15:26:23 UTC (rev 4810)
@@ -637,6 +637,8 @@
<Compile Include="NHSpecificTest\NH1985\SampleTest.cs" />
<Compile Include="NHSpecificTest\NH1990\Fixture.cs" />
<Compile Include="NHSpecificTest\NH1990\Model.cs" />
+ <Compile Include="NHSpecificTest\NH2000\DomainClass.cs" />
+ <Compile Include="NHSpecificTest\NH2000\SampleTest.cs" />
<Compile Include="NHSpecificTest\NH2003\Fixture.cs" />
<Compile Include="NHSpecificTest\NH2003\Model.cs" />
<Compile Include="NHSpecificTest\NH473\Child.cs" />
@@ -2052,6 +2054,7 @@
<EmbeddedResource Include="CfgTest\Loquacious\EntityToCache.hbm.xml" />
<EmbeddedResource Include="DriverTest\SqlServerCeEntity.hbm.xml" />
<Content Include="DynamicEntity\package.html" />
+ <EmbeddedResource Include="NHSpecificTest\NH2000\Mappings.hbm.xml" />
<EmbeddedResource Include="NHSpecificTest\NH2003\Mappings.hbm.xml" />
<EmbeddedResource Include="NHSpecificTest\NH1356\MappingsBag.hbm.xml" />
<EmbeddedResource Include="NHSpecificTest\NH1356\MappingsList.hbm.xml" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|