Skip to content

Commit ec2c56a

Browse files
author
Danko Durbić
committed
Fix for async AbstractEntityPersister
1 parent 66fdefc commit ec2c56a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/NHibernate/Async/Persister/Entity/AbstractEntityPersister.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ async Task InternalInitializeLazyPropertiesAsync()
8787
int[] lazyIndexes;
8888
if (allLazyProperties)
8989
{
90-
lazyIndexes = indexes = lazyPropertyNumbers;
90+
indexes = lazyPropertyNumbers;
91+
lazyIndexes = new int[lazyPropertyNumbers.Length];
92+
for(var i = 0; i < lazyIndexes.Length; i++)
93+
{
94+
lazyIndexes[i] = i;
95+
}
9196
}
9297
else
9398
{

src/NHibernate/Persister/Entity/AbstractEntityPersister.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ public void InitializeLazyProperties(
14251425
var metadata = InstrumentationMetadata.LazyPropertiesMetadata;
14261426
indexes = new int[uninitializedLazyProperties.Length];
14271427
lazyIndexes = new int[uninitializedLazyProperties.Length];
1428-
for(var i = 0; i < uninitializedLazyProperties.Length; i++)
1428+
for (var i = 0; i < uninitializedLazyProperties.Length; i++)
14291429
{
14301430
var descriptor = metadata.GetLazyPropertyDescriptor(uninitializedLazyProperties[i]);
14311431
indexes[i] = descriptor.PropertyIndex;

0 commit comments

Comments
 (0)