Skip to content

Commit 2bd8bc7

Browse files
committed
Fixed reporting of incorrect result-ref attribute values
1 parent cc46650 commit 2bd8bc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NHibernate/Impl/SessionFactoryImpl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,8 +1177,8 @@ private IDictionary<string, HibernateException> CheckNamedQueries()
11771177
NativeSQLQuerySpecification spec;
11781178
if (qd.ResultSetRef != null)
11791179
{
1180-
ResultSetMappingDefinition definition = sqlResultSetMappings[qd.ResultSetRef];
1181-
if (definition == null)
1180+
ResultSetMappingDefinition definition;
1181+
if (!sqlResultSetMappings.TryGetValue(qd.ResultSetRef, out definition))
11821182
{
11831183
throw new MappingException("Unable to find resultset-ref definition: " + qd.ResultSetRef);
11841184
}

0 commit comments

Comments
 (0)