Skip to content

Commit 810b3c1

Browse files
committed
Merge branch 'master' of github.com:nhibernate/nhibernate-core into oracle-dtc
2 parents 7fbe02f + 8671389 commit 810b3c1

File tree

67 files changed

+327
-622
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+327
-622
lines changed

build-common/common.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
<property name="link.sdkdoc.version" value="SDK_v1_1" />
197197
<!-- merge should work with 4.0 when compiling for 4.0 -->
198198
<property name="merge.targetplatform" value="v4" />
199-
<property name="referenceassemblies.dir" value="${environment::get-folder-path('ProgramFiles')}\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2" />
199+
<property name="referenceassemblies.dir" value="${environment::get-folder-path('ProgramFiles')}\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1" />
200200
</target>
201201

202202
<target name="set-net-3.5-framework-configuration">

releasenotes.txt

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
1-
Build 4.1.0.CR1
1+
Build 4.1.0.GA
22
=============================
33

4-
##### Possible Breaking Changes #####
4+
##### Possible Breaking Changes Since 4.0 #####
55
Proxies for classes that used lazy fields (not collections)
66
would have any exceptions from the entity wrapped in TargetInvocationException. This
77
wrapping exception have now been removed. Where relevant, you should instead catch
88
the original exception type you throw.
99

10-
For LINQ queries, the startAt parameter and the return value for string.IndexOf() are
11-
now correctly translated from .Net's 0-based indexing to SQL's 1-based indexing. LINQ
12-
queries that are written to expect SQL semantics for IndexOf() will likely need to be
13-
asjusted (NH-3846, NH-3901).
14-
Example: A LINQ query should now use 'x=>x.Name.IndexOf("a") == -1' to pick objects where
15-
the name doesn't contain the letter "a".
10+
For LINQ queries, the startAt parameter and the return value for string.IndexOf() are
11+
now correctly translated from .Net's 0-based indexing to SQL's 1-based indexing. LINQ
12+
queries that are written to expect SQL semantics for IndexOf() will likely need to be
13+
adjusted (NH-3846, NH-3901).
14+
Example: A LINQ query should now use 'x=>x.Name.IndexOf("a") == -1' to pick objects where
15+
the name doesn't contain the letter "a".
16+
17+
** Bug
18+
* [NH-3885] - ThreadSafeDictionary is not threadsafe
19+
20+
21+
Build 4.1.0.CR1
22+
=============================
1623

1724
** Bug
1825
* [NH-2038] - No substring length check in RemoveAsAliasesFromSql
@@ -47,7 +54,7 @@ Build 4.1.0.CR1
4754
* [NH-3666] - Setting native sql query cachable causes ArgumentNullException in CacheableResultTransformer.
4855
* [NH-3681] - NHibernate.HibernateException: Query Source could not be identified, when using join group and Sum()
4956
* [NH-3706] - NHibernate.Transform.Transformers should be static class
50-
* [NH-3727] - Criteria which use SubqueryProjection. Cannot be executed more than once. Second try throws exception.
57+
* [NH-3727] - Criteria which use SubqueryProjection. Cannot be executed more than once. Second try throws exception.
5158
* [NH-3741] - Many to Many mapping against interfaces fails (reverts to using ElementRelationMapper instead of ManyToManyRelationMapper)
5259
* [NH-3743] - Fetch with GroupBy throws NullReferenceException
5360
* [NH-3747] - Very weak support for predicates in Linq Aggregate functions
@@ -445,6 +452,13 @@ Build 4.0.0.Alpha1
445452
* [NH-3347] - Remove obsolete dialects for NH4
446453

447454

455+
Build 3.4.1.GA
456+
=============================
457+
458+
** Bug
459+
* [NH-3795] - C# compiler "Roslyn" regression
460+
461+
448462
Build 3.4.0.GA
449463
=============================
450464
** Known BREAKING CHANGES from NH3.3.0.GA to NH3.4.0.GA
@@ -531,6 +545,14 @@ Build 3.4.0.CR1
531545
** Task
532546
* [NH-3251] - Update to antlr 3.5.0.2
533547

548+
549+
Build 3.3.5.GA
550+
=============================
551+
552+
** Bug
553+
* [NH-3795] - C# compiler "Roslyn" regression
554+
555+
534556
Build 3.3.4.GA
535557
=============================
536558

src/NHibernate.DomainModel/NHibernate.DomainModel.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<OldToolsVersion>3.5</OldToolsVersion>
1616
<UpgradeBackupLocation>
1717
</UpgradeBackupLocation>
18-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
18+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1919
<PublishUrl>publish\</PublishUrl>
2020
<Install>true</Install>
2121
<InstallFrom>Disk</InstallFrom>

src/NHibernate.Everything.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Test", "NHiberna
6767
EndProject
6868
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "NHibernate.Example.Web", "NHibernate.Example.Web\", "{C5D6EE68-1760-4F97-AD31-42343593D8C1}"
6969
ProjectSection(WebsiteProperties) = preProject
70-
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
70+
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.6.1"
7171
ProjectReferences = "{5909BFE7-93CF-4E5F-BE22-6293368AF01D}|NHibernate.dll;"
7272
Debug.AspNetCompiler.VirtualPath = "/NHibernate.Example.Web"
7373
Debug.AspNetCompiler.PhysicalPath = "NHibernate.Example.Web\"

src/NHibernate.Example.Web/Web.Config

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
affects performance, set this value to true only
2424
during development.
2525
-->
26-
<compilation debug="true" targetFramework="4.0"/>
26+
<compilation debug="true" targetFramework="4.6.1"/>
2727
<!--
2828
The <authentication> section enables configuration
2929
of the security authentication mode used by
@@ -49,7 +49,9 @@
4949
</httpModules>
5050
</system.web>
5151
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
52-
<bytecode-provider type="null"/><!-- Important under Medium Trust -->
52+
<!-- Important under Medium Trust -->
53+
<bytecode-provider type="null"/>
54+
5355
<session-factory>
5456
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider, NHibernate</property>
5557
<property name="connection.connection_string">

src/NHibernate.Test.VisualBasic/Issues/NH3302/Fixture.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Namespace Issues
66

77
Namespace NH3302
88
'http://msdn.microsoft.com/en-us/library/swf8kaxw.aspx
9-
<TestFixture(), Ignore()> _
9+
<TestFixture(), Ignore("Not fixed yet.")> _
1010
Public Class Fixture
1111
Inherits IssueTestCase
1212

src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.vbproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<AssemblyName>NHibernate.Test.VisualBasic</AssemblyName>
1414
<FileAlignment>512</FileAlignment>
1515
<MyType>Windows</MyType>
16-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
16+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1717
<TargetFrameworkProfile />
1818
<StartAction>Program</StartAction>
1919
<StartProgram>$(MSBuildProjectDirectory)\..\..\Tools\nunit\nunit-x86.exe</StartProgram>

src/NHibernate.Test/App.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33

44
<configSections>
@@ -98,7 +98,7 @@
9898

9999
</log4net>
100100

101-
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup>
101+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup>
102102
<runtime>
103103
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
104104
<dependentAssembly>

src/NHibernate.Test/CfgTest/AccessorsSerializableTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@ public class AccessorsSerializableTest
99
{
1010
private static System.Type[] accessors = typeof (IPropertyAccessor).Assembly.GetTypes().Where(t => t.Namespace == typeof (IPropertyAccessor).Namespace && t.GetInterfaces().Contains(typeof (IPropertyAccessor))).ToArray();
1111

12-
[Test, TestCaseSource("accessors")]
12+
[Test, TestCaseSource(nameof(accessors))]
1313
public void AllAccessorsAreMarkedAsSerializable(System.Type concreteAccessor)
1414
{
1515
Assert.That(concreteAccessor, Has.Attribute<SerializableAttribute>());
1616
}
1717

1818
private static System.Type[] setters = typeof(ISetter).Assembly.GetTypes().Where(t => t.Namespace == typeof(ISetter).Namespace && t.GetInterfaces().Contains(typeof(ISetter))).ToArray();
1919

20-
[Test, TestCaseSource("setters")]
20+
[Test, TestCaseSource(nameof(setters))]
2121
public void AllSettersAreMarkedAsSerializable(System.Type concreteAccessor)
2222
{
2323
Assert.That(concreteAccessor, Has.Attribute<SerializableAttribute>());
2424
}
2525

2626
private static System.Type[] getters = typeof(IGetter).Assembly.GetTypes().Where(t => t.Namespace == typeof(IGetter).Namespace && t.GetInterfaces().Contains(typeof(IGetter))).ToArray();
2727

28-
[Test, TestCaseSource("getters")]
28+
[Test, TestCaseSource(nameof(getters))]
2929
public void AllGettersAreMarkedAsSerializable(System.Type concreteAccessor)
3030
{
3131
Assert.That(concreteAccessor, Has.Attribute<SerializableAttribute>());
3232
}
3333
}
34-
}
34+
}

src/NHibernate.Test/CfgTest/ConfigurationFixture.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class ConfigurationFixture
2727
public void ReadCfgXmlFromDefaultFile()
2828
{
2929
Configuration cfg = new Configuration();
30-
cfg.Configure("TestEnbeddedConfig.cfg.xml");
30+
cfg.Configure(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestEnbeddedConfig.cfg.xml"));
3131

3232
Assert.IsTrue(cfg.Properties.ContainsKey(Environment.ShowSql));
3333
Assert.IsTrue(cfg.Properties.ContainsKey(Environment.UseQueryCache));
@@ -91,16 +91,16 @@ public void ReadCfgXmlFromAssembly()
9191
public void InvalidXmlInCfgFile()
9292
{
9393
XmlDocument cfgXml = new XmlDocument();
94-
cfgXml.Load("TestEnbeddedConfig.cfg.xml");
94+
cfgXml.Load(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestEnbeddedConfig.cfg.xml"));
9595

9696
// this should put us at the first <property> element
9797
XmlElement propElement = cfgXml.DocumentElement.GetElementsByTagName("property")[0] as XmlElement;
9898

9999
// removing this will cause it not to validate
100100
propElement.RemoveAttribute("name");
101101

102-
const string FileNameForInvalidCfg = "hibernate.invalid.cfg.xml";
103-
cfgXml.Save(FileNameForInvalidCfg);
102+
string FileNameForInvalidCfg = Path.Combine(TestContext.CurrentContext.TestDirectory, "hibernate.invalid.cfg.xml");
103+
cfgXml.Save(FileNameForInvalidCfg);
104104

105105
Configuration cfg = new Configuration();
106106
try
@@ -222,7 +222,7 @@ public void CacheConfiguration()
222222
[Test]
223223
public void InvalidXmlInHbmFile()
224224
{
225-
string filename = "invalid.hbm.xml";
225+
string filename = Path.Combine(TestContext.CurrentContext.TestDirectory, "invalid.hbm.xml");
226226
// it's missing the class name - won't validate
227227
string hbm =
228228
@"<?xml version='1.0' encoding='utf-8' ?>
@@ -432,7 +432,7 @@ public SampleQueryProvider(ISessionImplementor session) : base(session)
432432
public void NH2890Standard()
433433
{
434434
var cfg = new Configuration();
435-
cfg.Configure("TestEnbeddedConfig.cfg.xml")
435+
cfg.Configure(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestEnbeddedConfig.cfg.xml"))
436436
.LinqQueryProvider<SampleQueryProvider>()
437437
.SetDefaultAssembly("NHibernate.DomainModel")
438438
.SetDefaultNamespace("NHibernate.DomainModel");
@@ -451,7 +451,7 @@ public void NH2890Standard()
451451
public void NH2890Xml()
452452
{
453453
var cfg = new Configuration();
454-
cfg.Configure("TestEnbeddedConfig.cfg.xml")
454+
cfg.Configure(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestEnbeddedConfig.cfg.xml"))
455455
.SetDefaultAssembly("NHibernate.DomainModel")
456456
.SetDefaultNamespace("NHibernate.DomainModel");
457457

src/NHibernate.Test/CfgTest/DefaultNsAssmFixture.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,33 +97,33 @@ public class DefaultNsAssmFixture
9797
[TestFixtureSetUp]
9898
public void TestFixtureSetUp()
9999
{
100-
dir_ = Directory.GetCurrentDirectory();
100+
dir_ = TestContext.CurrentContext.TestDirectory;
101101

102102
// Create hbm files (ideally, we could just embed them directly into the
103103
// assembly - same as VS does when 'Build Action' = 'Embedded Resource' - but
104104
// I could not find a way to do this, so we use files instead)
105105

106-
StreamWriter aw = new StreamWriter("A1.hbm.xml");
106+
StreamWriter aw = new StreamWriter(Path.Combine(dir_, "A1.hbm.xml"));
107107
aw.Write(aJoinedHbmXml);
108108
aw.Close();
109109

110-
StreamWriter bw = new StreamWriter("B1.hbm.xml");
110+
StreamWriter bw = new StreamWriter(Path.Combine(dir_, "B1.hbm.xml"));
111111
bw.Write(bJoinedHbmXml);
112112
bw.Close();
113113

114-
StreamWriter cw = new StreamWriter("C1.hbm.xml");
114+
StreamWriter cw = new StreamWriter(Path.Combine(dir_, "C1.hbm.xml"));
115115
cw.Write(cJoinedHbmXml);
116116
cw.Close();
117117

118-
StreamWriter asw = new StreamWriter("A1.subclass.hbm.xml");
118+
StreamWriter asw = new StreamWriter(Path.Combine(dir_, "A1.subclass.hbm.xml"));
119119
asw.Write(aJoinedHbmXml);
120120
asw.Close();
121121

122-
StreamWriter bsw = new StreamWriter("B1.subclass.hbm.xml");
122+
StreamWriter bsw = new StreamWriter(Path.Combine(dir_, "B1.subclass.hbm.xml"));
123123
bsw.Write(bJoinedHbmXml);
124124
bsw.Close();
125125

126-
StreamWriter csw = new StreamWriter("C1.subclass.hbm.xml");
126+
StreamWriter csw = new StreamWriter(Path.Combine(dir_, "C1.subclass.hbm.xml"));
127127
csw.Write(cJoinedHbmXml);
128128
csw.Close();
129129
}
@@ -151,15 +151,15 @@ public void TopDownJoined()
151151
AssemblyName assemblyName = new AssemblyName();
152152
assemblyName.Name = "MyTestA1.dll";
153153
AssemblyBuilder assemblyBuilder =
154-
AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave);
154+
AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave, dir_);
155155
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name, assemblyName.Name, true);
156156
assemblyBuilder.AddResourceFile("A.hbm.xml", "A1.hbm.xml");
157157
assemblyBuilder.AddResourceFile("B.hbm.xml", "B1.hbm.xml");
158158
assemblyBuilder.AddResourceFile("C.hbm.xml", "C1.hbm.xml");
159159
assemblyBuilder.Save(assemblyName.Name);
160160

161161
Configuration cfg = new Configuration();
162-
cfg.AddAssembly(Assembly.LoadFile(dir_ + "/" + assemblyName.Name));
162+
cfg.AddAssembly(Assembly.LoadFile(Path.Combine(dir_, assemblyName.Name)));
163163
// if no exception, success
164164
}
165165

@@ -169,15 +169,15 @@ public void BottomUpJoined()
169169
AssemblyName assemblyName = new AssemblyName();
170170
assemblyName.Name = "MyTestB1.dll";
171171
AssemblyBuilder assemblyBuilder =
172-
AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave);
172+
AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave, dir_);
173173
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name, assemblyName.Name, true);
174174
assemblyBuilder.AddResourceFile("C.hbm.xml", "C1.hbm.xml");
175175
assemblyBuilder.AddResourceFile("B.hbm.xml", "B1.hbm.xml");
176176
assemblyBuilder.AddResourceFile("A.hbm.xml", "A1.hbm.xml");
177177
assemblyBuilder.Save(assemblyName.Name);
178178

179179
Configuration cfg = new Configuration();
180-
cfg.AddAssembly(Assembly.LoadFile(dir_ + "/" + assemblyName.Name));
180+
cfg.AddAssembly(Assembly.LoadFile(Path.Combine(dir_, assemblyName.Name)));
181181
// if no exception, success
182182
}
183183

@@ -187,15 +187,15 @@ public void MixedJoined()
187187
AssemblyName assemblyName = new AssemblyName();
188188
assemblyName.Name = "MyTestC1.dll";
189189
AssemblyBuilder assemblyBuilder =
190-
AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave);
190+
AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave, dir_);
191191
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name, assemblyName.Name, true);
192192
assemblyBuilder.AddResourceFile("B.hbm.xml", "B1.hbm.xml");
193193
assemblyBuilder.AddResourceFile("A.hbm.xml", "A1.hbm.xml");
194194
assemblyBuilder.AddResourceFile("C.hbm.xml", "C1.hbm.xml");
195195
assemblyBuilder.Save(assemblyName.Name);
196196

197197
Configuration cfg = new Configuration();
198-
cfg.AddAssembly(Assembly.LoadFile(dir_ + "/" + assemblyName.Name));
198+
cfg.AddAssembly(Assembly.LoadFile(Path.Combine(dir_, assemblyName.Name)));
199199
// if no exception, success
200200
}
201201

@@ -205,15 +205,15 @@ public void MixedSubclass()
205205
AssemblyName assemblyName = new AssemblyName();
206206
assemblyName.Name = "MyTestCSubclass1.dll";
207207
AssemblyBuilder assemblyBuilder =
208-
AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave);
208+
AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave, dir_);
209209
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(assemblyName.Name, assemblyName.Name, true);
210210
assemblyBuilder.AddResourceFile("B.subclass.hbm.xml", "B1.hbm.xml");
211211
assemblyBuilder.AddResourceFile("A.subclass.hbm.xml", "A1.hbm.xml");
212212
assemblyBuilder.AddResourceFile("C.subclass.hbm.xml", "C1.hbm.xml");
213213
assemblyBuilder.Save(assemblyName.Name);
214214

215215
Configuration cfg = new Configuration();
216-
cfg.AddAssembly(Assembly.LoadFile(dir_ + "/" + assemblyName.Name));
216+
cfg.AddAssembly(Assembly.LoadFile(Path.Combine(dir_, assemblyName.Name)));
217217
// if no exception, success
218218
}
219219
}

0 commit comments

Comments
 (0)