File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
Async/Immutable/EntityWithMutableCollection
Immutable/EntityWithMutableCollection Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -1234,7 +1234,6 @@ public virtual async Task OneToManyCollectionOptimisticLockingWithUpdateAsync()
1234
1234
1235
1235
s = OpenSession ( ) ;
1236
1236
t = s . BeginTransaction ( ) ;
1237
- c = await ( s . CreateCriteria < Contract > ( ) . UniqueResultAsync < Contract > ( ) ) ;
1238
1237
// If the entity uses a join mapping, DML queries require temp tables.
1239
1238
if ( Dialect . SupportsTemporaryTables )
1240
1239
await ( s . CreateQuery ( "delete from Party" ) . ExecuteUpdateAsync ( ) ) ;
@@ -1251,7 +1250,7 @@ public virtual async Task OneToManyCollectionOptimisticLockingWithUpdateAsync()
1251
1250
await ( s . DeleteAsync ( partyOrig ) ) ;
1252
1251
await ( s . DeleteAsync ( newParty ) ) ;
1253
1252
}
1254
-
1253
+ c = await ( s . CreateCriteria < Contract > ( ) . UniqueResultAsync < Contract > ( ) ) ;
1255
1254
await ( s . DeleteAsync ( c ) ) ;
1256
1255
Assert . That ( await ( s . CreateCriteria < Contract > ( ) . SetProjection ( Projections . RowCountInt64 ( ) ) . UniqueResultAsync < long > ( ) ) , Is . EqualTo ( 0L ) ) ;
1257
1256
Assert . That ( await ( s . CreateCriteria < Party > ( ) . SetProjection ( Projections . RowCountInt64 ( ) ) . UniqueResultAsync < long > ( ) ) , Is . EqualTo ( 0L ) ) ;
Original file line number Diff line number Diff line change @@ -1223,7 +1223,6 @@ public virtual void OneToManyCollectionOptimisticLockingWithUpdate()
1223
1223
1224
1224
s = OpenSession ( ) ;
1225
1225
t = s . BeginTransaction ( ) ;
1226
- c = s . CreateCriteria < Contract > ( ) . UniqueResult < Contract > ( ) ;
1227
1226
// If the entity uses a join mapping, DML queries require temp tables.
1228
1227
if ( Dialect . SupportsTemporaryTables )
1229
1228
s . CreateQuery ( "delete from Party" ) . ExecuteUpdate ( ) ;
@@ -1240,7 +1239,7 @@ public virtual void OneToManyCollectionOptimisticLockingWithUpdate()
1240
1239
s . Delete ( partyOrig ) ;
1241
1240
s . Delete ( newParty ) ;
1242
1241
}
1243
-
1242
+ c = s . CreateCriteria < Contract > ( ) . UniqueResult < Contract > ( ) ;
1244
1243
s . Delete ( c ) ;
1245
1244
Assert . That ( s . CreateCriteria < Contract > ( ) . SetProjection ( Projections . RowCountInt64 ( ) ) . UniqueResult < long > ( ) , Is . EqualTo ( 0L ) ) ;
1246
1245
Assert . That ( s . CreateCriteria < Party > ( ) . SetProjection ( Projections . RowCountInt64 ( ) ) . UniqueResult < long > ( ) , Is . EqualTo ( 0L ) ) ;
You can’t perform that action at this time.
0 commit comments