-
Notifications
You must be signed in to change notification settings - Fork 929
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6640f2
commit 0f89eb9
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
src/NHibernate.Test/Async/NHSpecificTest/NHNewBug/ManyToOneFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by AsyncGenerator. | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using NUnit.Framework; | ||
|
||
/* 项目“NHibernate.Test (net48)”的未合并的更改 | ||
在此之前: | ||
using NHibernate.Test.NHSpecificTest; | ||
在此之后: | ||
using NHibernate.Test.NHSpecificTest; | ||
using NHibernate; | ||
using NHibernate.Test; | ||
using NHibernate.Test.MappingTest; | ||
using NHibernate.Test.NHSpecificTest.NHNewBug; | ||
*/ | ||
using NHibernate.Test.NHSpecificTest; | ||
|
||
namespace NHibernate.Test.NHSpecificTest.NHNewBug | ||
{ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
[TestFixture] | ||
internal class ManyToOneFixtureAsync : BugTestCase | ||
{ | ||
[Test] | ||
public async Task AccessIdOfManyToOneInEmbeddableAsync() | ||
{ | ||
ISession s = OpenSession(); | ||
ITransaction t = s.BeginTransaction(); | ||
Parent p = new Parent(); | ||
p.ContainedChildren.Add(new ContainedChild(new Child())); | ||
await (s.PersistAsync(p)); | ||
await (t.CommitAsync()); | ||
var list = await (s.CreateQuery("from Parent p join p.ContainedChildren c where c.Child.Id is not null").ListAsync()); | ||
Assert.AreNotEqual(0, list.Count); | ||
await (s.DeleteAsync(p)); | ||
await (t.CommitAsync()); | ||
s.Close(); | ||
} | ||
} | ||
} |