Skip to content

Commit 8d33b54

Browse files
committed
some random changes
1 parent 55c61f8 commit 8d33b54

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

src/NHibernate.DomainModel/Container.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public Glarch Glarch
9292
private IDictionary<string, Ternary> _ternaryMap;
9393
//<set> mapping
9494
private ISet<Ternary> _ternarySet;
95-
private One _one;
95+
private One _oneToOne;
9696

9797
public virtual IList<Simple> OneToMany
9898
{
@@ -130,10 +130,10 @@ public virtual long Id
130130
set { _id = value; }
131131
}
132132

133-
public virtual One One
133+
public virtual One OneToOne
134134
{
135-
get => _one;
136-
set => _one = value;
135+
get => _oneToOne;
136+
set => _oneToOne = value;
137137
}
138138

139139
public virtual IList<Contained> Bag

src/NHibernate.DomainModel/Container.hbm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
>
2323
<generator class="native" />
2424
</id>
25-
<one-to-one name="One" />
25+
<one-to-one name="OneToOne" />
2626
<list
2727
name="OneToMany"
2828
lazy="true"

src/NHibernate.Test/Async/Legacy/ParentChildTest.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,10 @@ public async Task CollectionQueryAsync()
383383
l.Add(null);
384384
l.Add(s2);
385385
c.ManyToMany = l;
386-
c.One = new One { Value = "one" };
387-
await (s.SaveAsync(c.One));
386+
c.OneToOne = new One { Value = "one" };
387+
await (s.SaveAsync(c.OneToOne));
388388
await (s.SaveAsync(c));
389+
await (s.FlushAsync());
389390

390391
Assert.AreEqual(1,
391392
(await (s.CreateQuery("select c from c in class ContainerX, s in class Simple where c.OneToMany[2] = s").ListAsync
@@ -429,7 +430,7 @@ public async Task CollectionQueryAsync()
429430
"select c from c in class ContainerX where c.ManyToMany[ c.OneToMany[0].Count ].Name = 's'").ListAsync())).
430431
Count);
431432

432-
await (s.DeleteAsync(c.One));
433+
await (s.DeleteAsync(c.OneToOne));
433434
await (s.DeleteAsync(c));
434435
await (s.DeleteAsync(s1));
435436
await (s.DeleteAsync(s2));

src/NHibernate.Test/Legacy/ParentChildTest.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,16 @@ public void CollectionQuery()
372372
l.Add(null);
373373
l.Add(s2);
374374
c.ManyToMany = l;
375-
c.One = new One { Value = "one" };
376-
s.Save(c.One);
375+
c.OneToOne = new One { Value = "one" };
376+
s.Save(c.OneToOne);
377377
s.Save(c);
378+
s.Flush();
378379

379380
Assert.AreEqual(1,
380381
s.CreateQuery("select c from c in class ContainerX, s in class Simple where c.OneToMany[2] = s").List
381382
().Count);
382383
Assert.AreEqual(1,
383-
s.CreateQuery("select c from c in class ContainerX, s in class Simple where c.OneToMany[2] = s and c.One != null").List
384+
s.CreateQuery("select c from c in class ContainerX, s in class Simple where c.OneToMany[2] = s and c.OneToOne != null").List
384385
().Count);
385386
Assert.AreEqual(1,
386387
s.CreateQuery("select c from c in class ContainerX, s in class Simple where c.ManyToMany[2] = s").
@@ -418,7 +419,7 @@ public void CollectionQuery()
418419
"select c from c in class ContainerX where c.ManyToMany[ c.OneToMany[0].Count ].Name = 's'").List().
419420
Count);
420421

421-
s.Delete(c.One);
422+
s.Delete(c.OneToOne);
422423
s.Delete(c);
423424
s.Delete(s1);
424425
s.Delete(s2);

0 commit comments

Comments
 (0)