We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6823bc4 commit c436a8cCopy full SHA for c436a8c
src/NHibernate/Impl/StatelessSessionImpl.cs
@@ -316,7 +316,13 @@ public override bool IsEventSource
316
public override object GetEntityUsingInterceptor(EntityKey key)
317
{
318
CheckAndUpdateSessionStatus();
319
- return null;
+ // while a pending Query we should use existing temporary entities so a join fetch does not create multiple instances
320
+ // of the same parent item
321
+ object obj;
322
+ if (temporaryPersistenceContext.EntitiesByKey.TryGetValue(key, out obj))
323
+ return obj;
324
+ else
325
+ return null;
326
}
327
328
public override IPersistenceContext PersistenceContext
0 commit comments