File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ public Glarch Glarch
92
92
private IDictionary < string , Ternary > _ternaryMap ;
93
93
//<set> mapping
94
94
private ISet < Ternary > _ternarySet ;
95
- private One _one ;
95
+ private Simple _manyToOne ;
96
96
97
97
public virtual IList < Simple > OneToMany
98
98
{
@@ -130,10 +130,10 @@ public virtual long Id
130
130
set { _id = value ; }
131
131
}
132
132
133
- public virtual One One
133
+ public virtual Simple ManyToOne
134
134
{
135
- get => _one ;
136
- set => _one = value ;
135
+ get => _manyToOne ;
136
+ set => _manyToOne = value ;
137
137
}
138
138
139
139
public virtual IList < Contained > Bag
Original file line number Diff line number Diff line change 22
22
>
23
23
<generator class =" native" />
24
24
</id >
25
- <one -to-one name =" One " />
25
+ <many -to-one name =" ManyToOne " lazy = " proxy " />
26
26
<list
27
27
name=" OneToMany"
28
28
lazy=" true"
Original file line number Diff line number Diff line change @@ -383,15 +383,15 @@ public async Task CollectionQueryAsync()
383
383
l . Add ( null ) ;
384
384
l . Add ( s2 ) ;
385
385
c . ManyToMany = l ;
386
- c . One = new One { Value = "one" } ;
387
- await ( s . SaveAsync ( c . One ) ) ;
386
+ c . ManyToOne = new Simple { Name = "x" , Count = 4 } ;
387
+ await ( s . SaveAsync ( c . ManyToOne , c . ManyToOne . Count ) ) ;
388
388
await ( s . SaveAsync ( c ) ) ;
389
389
390
390
Assert . AreEqual ( 1 ,
391
391
( await ( s . CreateQuery ( "select c from c in class ContainerX, s in class Simple where c.OneToMany[2] = s" ) . ListAsync
392
392
( ) ) ) . Count ) ;
393
393
Assert . AreEqual ( 1 ,
394
- ( await ( s . CreateQuery ( "select c from c in class ContainerX, s in class Simple where c.OneToMany[2] = s and c.One != null " ) . ListAsync
394
+ ( await ( s . CreateQuery ( "select c from c in class ContainerX, s in class Simple where c.OneToMany[2] = s and c.ManyToOne.Name = 'x' " ) . ListAsync
395
395
( ) ) ) . Count ) ;
396
396
Assert . AreEqual ( 1 ,
397
397
( await ( s . CreateQuery ( "select c from c in class ContainerX, s in class Simple where c.ManyToMany[2] = s" ) .
@@ -429,7 +429,7 @@ public async Task CollectionQueryAsync()
429
429
"select c from c in class ContainerX where c.ManyToMany[ c.OneToMany[0].Count ].Name = 's'" ) . ListAsync ( ) ) ) .
430
430
Count ) ;
431
431
432
- await ( s . DeleteAsync ( c . One ) ) ;
432
+ await ( s . DeleteAsync ( c . ManyToOne ) ) ;
433
433
await ( s . DeleteAsync ( c ) ) ;
434
434
await ( s . DeleteAsync ( s1 ) ) ;
435
435
await ( s . DeleteAsync ( s2 ) ) ;
Original file line number Diff line number Diff line change @@ -372,15 +372,15 @@ public void CollectionQuery()
372
372
l . Add ( null ) ;
373
373
l . Add ( s2 ) ;
374
374
c . ManyToMany = l ;
375
- c . One = new One { Value = "one" } ;
376
- s . Save ( c . One ) ;
375
+ c . ManyToOne = new Simple { Name = "x" , Count = 4 } ;
376
+ s . Save ( c . ManyToOne , c . ManyToOne . Count ) ;
377
377
s . Save ( c ) ;
378
378
379
379
Assert . AreEqual ( 1 ,
380
380
s . CreateQuery ( "select c from c in class ContainerX, s in class Simple where c.OneToMany[2] = s" ) . List
381
381
( ) . Count ) ;
382
382
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
383
+ s . CreateQuery ( "select c from c in class ContainerX, s in class Simple where c.OneToMany[2] = s and c.ManyToOne.Name = 'x' " ) . List
384
384
( ) . Count ) ;
385
385
Assert . AreEqual ( 1 ,
386
386
s . CreateQuery ( "select c from c in class ContainerX, s in class Simple where c.ManyToMany[2] = s" ) .
@@ -418,7 +418,7 @@ public void CollectionQuery()
418
418
"select c from c in class ContainerX where c.ManyToMany[ c.OneToMany[0].Count ].Name = 's'" ) . List ( ) .
419
419
Count ) ;
420
420
421
- s . Delete ( c . One ) ;
421
+ s . Delete ( c . ManyToOne ) ;
422
422
s . Delete ( c ) ;
423
423
s . Delete ( s1 ) ;
424
424
s . Delete ( s2 ) ;
You can’t perform that action at this time.
0 commit comments