Skip to content

Commit e111661

Browse files
authored
Merge branch 'master' into JoinSubQueryHql
2 parents 9e0d2db + ff6e513 commit e111661

File tree

105 files changed

+1555
-203
lines changed

Some content is hidden

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

105 files changed

+1555
-203
lines changed

releasenotes.txt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
Build 5.3.13
1+
Build 5.3.14
2+
=============================
3+
4+
Release notes - NHibernate - Version 5.3.14
5+
6+
3 issues were resolved in this release.
7+
8+
** Bug
9+
10+
#3169 InvalidOperationException: This transformer is not initialized by Cached Query
11+
#3164 Fetching a lazy loaded component regression
12+
13+
** Task
14+
15+
* #3183 Release 5.3.14
16+
17+
18+
Build 5.3.13
219
=============================
320

421
Release notes - NHibernate - Version 5.3.13

src/NHibernate.Test/Any/AnyTypeTest.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ protected override string[] Mappings
1515
get { return new string[] {"Any.Person.hbm.xml"}; }
1616
}
1717

18-
protected override string CacheConcurrencyStrategy
19-
{
20-
get { return null; }
21-
}
22-
2318
[Test]
2419
public void FlushProcessing()
2520
{

src/NHibernate.Test/Async/Any/AnyTypeTest.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ protected override string[] Mappings
2626
get { return new string[] {"Any.Person.hbm.xml"}; }
2727
}
2828

29-
protected override string CacheConcurrencyStrategy
30-
{
31-
get { return null; }
32-
}
33-
3429
[Test]
3530
public async Task FlushProcessingAsync()
3631
{

src/NHibernate.Test/Async/BulkManipulation/NativeSQLBulkOperationsWithCache.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ namespace NHibernate.Test.BulkManipulation
2525
[TestFixture]
2626
public class NativeSQLBulkOperationsWithCacheAsync : TestCase
2727
{
28+
protected override string CacheConcurrencyStrategy => "nonstrict-read-write";
29+
2830
protected override string MappingsAssembly => "NHibernate.Test";
2931

3032
protected override string[] Mappings => new[] { "BulkManipulation.Vehicle.hbm.xml" };

src/NHibernate.Test/Async/CacheTest/BatchableCacheFixture.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ public BatchableCacheFixtureAsync(BatchFetchStyle fetchStyle)
4444

4545
protected override string MappingsAssembly => "NHibernate.Test";
4646

47-
protected override string CacheConcurrencyStrategy => null;
48-
4947
protected override void Configure(Configuration configuration)
5048
{
5149
configuration.SetProperty(Environment.UseSecondLevelCache, "true");

src/NHibernate.Test/Async/CacheTest/BuildCacheFixture.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ public class BuildCacheFixtureAsync : TestCase
2929

3030
protected override string[] Mappings => new[] { "CacheTest.EntitiesInSameRegion.hbm.xml" };
3131

32-
// Disable the TestCase cache overrides.
33-
protected override string CacheConcurrencyStrategy => null;
34-
3532
protected override void Configure(Configuration configuration)
3633
{
3734
configuration.SetProperty(Environment.UseQueryCache, "true");

src/NHibernate.Test/Async/CacheTest/CacheFixture.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace NHibernate.Test.CacheTest
2222
public class CacheFixtureAsync: TestCase
2323
{
2424
[Test]
25-
public async Task TestSimpleCacheAsync()
25+
public async Task TestSimpleReadWriteCacheAsync()
2626
{
2727
await (DoTestCacheAsync(new HashtableCacheProvider()));
2828
}
@@ -57,7 +57,8 @@ protected CacheKey CreateCacheKey(string text)
5757

5858
Assert.IsNull(await (ccs.GetAsync(fooKey, longBefore, cancellationToken)));
5959
Assert.AreEqual("foo", await (ccs.GetAsync(fooKey, after, cancellationToken)));
60-
Assert.IsFalse(await (ccs.PutAsync(fooKey, "foo", before, null, null, false, cancellationToken)));
60+
Assert.IsFalse(await (ccs.PutAsync(fooKey, "foo", before, null, null, true, cancellationToken)));
61+
Assert.IsTrue(await (ccs.PutAsync(fooKey, "foo", before, null, null, false, cancellationToken)));
6162

6263
// update it;
6364

src/NHibernate.Test/Async/CacheTest/SerializingCacheFixture.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ public class SerializingCacheFixtureAsync : TestCase
2828

2929
protected override string MappingsAssembly => "NHibernate.Test";
3030

31-
protected override string CacheConcurrencyStrategy => null;
32-
3331
protected override void Configure(Configuration configuration)
3432
{
3533
configuration.SetProperty(Environment.UseSecondLevelCache, "true");

src/NHibernate.Test/Async/CompositeId/CompositeIdFixture.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ protected override string[] Mappings
3838
}
3939
}
4040

41-
protected override string CacheConcurrencyStrategy
42-
{
43-
get { return null; }
44-
}
45-
4641
protected override bool AppliesTo(Dialect.Dialect dialect)
4742
{
4843
// Order uses a scalar sub-select formula.

src/NHibernate.Test/Async/Criteria/SelectModeTest/SelectModeTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public class SelectModeTestAsync : TestCaseMappingByCode
3232
{
3333
private Guid _parentEntityComplexId;
3434

35+
protected override string CacheConcurrencyStrategy => "nonstrict-read-write";
36+
3537
[Test]
3638
public async Task SelectModeJoinOnlyAsync()
3739
{

src/NHibernate.Test/Async/Extralazy/ExtraLazyFixture.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ protected override string[] Mappings
3232
get { return new[] {"Extralazy.UserGroup.hbm.xml"}; }
3333
}
3434

35-
protected override string CacheConcurrencyStrategy
36-
{
37-
get { return null; }
38-
}
39-
4035
protected override void Configure(Configuration configuration)
4136
{
4237
configuration.SetProperty(Cfg.Environment.GenerateStatistics, "true");

src/NHibernate.Test/Async/FetchLazyProperties/FetchLazyPropertiesFixture.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ namespace NHibernate.Test.FetchLazyProperties
2525
[TestFixture]
2626
public class FetchLazyPropertiesFixtureAsync : TestCase
2727
{
28+
protected override string CacheConcurrencyStrategy => "nonstrict-read-write";
29+
2830
protected override string MappingsAssembly
2931
{
3032
get { return "NHibernate.Test"; }

src/NHibernate.Test/Async/FilterTest/DynamicFilterTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public class DynamicFilterTestAsync : TestCase
2828
private static readonly ILog log = LogManager.GetLogger(typeof(DynamicFilterTestAsync));
2929
private TestData testData;
3030

31+
protected override string CacheConcurrencyStrategy => "nonstrict-read-write";
32+
3133
protected override void OnSetUp()
3234
{
3335
testData = new TestData(this);

src/NHibernate.Test/Async/Futures/LinqFutureFixture.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ namespace NHibernate.Test.Futures
2020
[TestFixture]
2121
public class LinqFutureFixtureAsync : FutureFixture
2222
{
23+
protected override string CacheConcurrencyStrategy => "nonstrict-read-write";
24+
2325
protected override void OnTearDown()
2426
{
2527
using (var session = OpenSession())

src/NHibernate.Test/Async/Futures/QueryBatchFixture.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public class QueryBatchFixtureAsync : TestCaseMappingByCode
2828
private Guid _parentId;
2929
private Guid _eagerId;
3030

31+
protected override string CacheConcurrencyStrategy => "nonstrict-read-write";
32+
3133
[Test]
3234
public async Task CanCombineCriteriaAndHqlInFutureAsync()
3335
{

src/NHibernate.Test/Async/GeneratedTest/TriggerGeneratedValuesWithoutCachingTest.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,5 @@ protected override bool AppliesTo(Dialect.Dialect dialect)
3030
{
3131
return dialect is MsSql2000Dialect || dialect is Oracle8iDialect;
3232
}
33-
34-
protected override string CacheConcurrencyStrategy
35-
{
36-
get { return null; }
37-
}
3833
}
3934
}

src/NHibernate.Test/Async/LazyGroup/LazyGroupFixture.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ namespace NHibernate.Test.LazyGroup
2222
[TestFixture]
2323
public class LazyGroupFixtureAsync : TestCase
2424
{
25+
protected override string CacheConcurrencyStrategy => "nonstrict-read-write";
26+
2527
protected override string MappingsAssembly => "NHibernate.Test";
2628

2729
protected override string[] Mappings => new[] { "LazyGroup.Mappings.hbm.xml" };

src/NHibernate.Test/Async/LazyOneToOne/LazyOneToOneTest.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ protected override void Configure(Cfg.Configuration configuration)
4141
configuration.SetProperty(Environment.UseSecondLevelCache, "false");
4242
}
4343

44-
protected override string CacheConcurrencyStrategy
45-
{
46-
get { return null; }
47-
}
48-
4944
[Test]
5045
public async Task LazyAsync()
5146
{

src/NHibernate.Test/Async/LazyProperty/LazyPropertyFixture.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ protected override string[] Mappings
3636
get { return new[] { "LazyProperty.Mappings.hbm.xml" }; }
3737
}
3838

39-
protected override string CacheConcurrencyStrategy => null;
40-
4139
protected override DebugSessionFactory BuildSessionFactory()
4240
{
4341
using (var logSpy = new LogSpy(typeof(EntityMetamodel)))

src/NHibernate.Test/Async/NHSpecificTest/GH1754/Fixture.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ namespace NHibernate.Test.NHSpecificTest.GH1754
1919
[TestFixture]
2020
public class FixtureAsync : BugTestCase
2121
{
22-
// Disable second level cache
23-
protected override string CacheConcurrencyStrategy => null;
24-
2522
protected override void OnSetUp()
2623
{
2724
Sfi.Statistics.IsStatisticsEnabled = true;

src/NHibernate.Test/Async/NHSpecificTest/GH1756/UnsavedValueNoneFixture.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ namespace NHibernate.Test.NHSpecificTest.GH1756
1919
[TestFixture]
2020
public class UnsavedValueNoneFixtureAsync : BugTestCase
2121
{
22-
// disable second level cache enabled by default by the base class.
23-
protected override string CacheConcurrencyStrategy => null;
24-
2522
protected override void OnSetUp()
2623
{
2724
using (var session = OpenSession())

src/NHibernate.Test/Async/NHSpecificTest/GH2552/Fixture.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ namespace NHibernate.Test.NHSpecificTest.GH2552
2323
[TestFixture]
2424
public class FixtureAsync : BugTestCase
2525
{
26-
protected override string CacheConcurrencyStrategy => null;
27-
2826
protected override void Configure(NHCfg.Configuration configuration)
2927
{
3028
configuration.SetProperty(NHCfg.Environment.UseSecondLevelCache, "true");
3129
configuration.SetProperty(NHCfg.Environment.GenerateStatistics, "true");
30+
configuration.SetProperty(NHCfg.Environment.UseMinimalPuts, "true");
3231
}
3332

3433
protected override void OnTearDown()
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by AsyncGenerator.
4+
//
5+
// Changes to this file may cause incorrect behavior and will be lost if
6+
// the code is regenerated.
7+
// </auto-generated>
8+
//------------------------------------------------------------------------------
9+
10+
11+
using System.Linq;
12+
using NHibernate.Cfg.MappingSchema;
13+
using NHibernate.Mapping.ByCode;
14+
using NUnit.Framework;
15+
using NHibernate.Linq;
16+
17+
namespace NHibernate.Test.NHSpecificTest.GH3164
18+
{
19+
using System.Threading.Tasks;
20+
[TestFixture]
21+
public class ByCodeFixtureAsync : TestCaseMappingByCode
22+
{
23+
protected override HbmMapping GetMappings()
24+
{
25+
var mapper = new ModelMapper();
26+
mapper.AddMapping<ContentItemMapping>();
27+
mapper.AddMapping<HeadMapping>();
28+
29+
return mapper.CompileMappingForAllExplicitlyAddedEntities();
30+
}
31+
32+
protected override void OnSetUp()
33+
{
34+
using (var session = OpenSession())
35+
using (var transaction = session.BeginTransaction())
36+
{
37+
var e1 = new ContentItem { Name = "Test" };
38+
session.Save(e1);
39+
40+
transaction.Commit();
41+
}
42+
}
43+
44+
protected override void OnTearDown()
45+
{
46+
using (var session = OpenSession())
47+
using (var transaction = session.BeginTransaction())
48+
{
49+
session.CreateQuery("delete from System.Object").ExecuteUpdate();
50+
51+
transaction.Commit();
52+
}
53+
}
54+
55+
[Test]
56+
public async Task FetchComponentAsync()
57+
{
58+
using (var session = OpenSession())
59+
{
60+
var result = await (session.Query<ContentItem>().Fetch(i => i.Head).ToListAsync());
61+
62+
Assert.That(result.Count, Is.EqualTo(1));
63+
}
64+
}
65+
}
66+
}

0 commit comments

Comments
 (0)