Skip to content

Commit 7ec0bf7

Browse files
committed
Merge some cleanup commits (part of ggeurts:customsql)
2 parents 38ef836 + 2bd8bc7 commit 7ec0bf7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/NHibernate.Test/SqlTest/Query/NativeSQLQueries.hbm.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,6 @@
241241

242242
<sql-query name="organizationautodetect" resultset-ref="org-description">
243243
<!-- equal to "organizationpropertyreturn" but since no {} nor return-property are used hibernate will fallback to use the columns directly from the mapping -->
244-
<return alias="org" class="Organization"/>
245-
<return-join alias="emp" property="org.employments"/>
246244
SELECT org.ORGID as orgid,
247245
org.NAME as name,
248246
emp.EMPLOYER as employer,

src/NHibernate/Impl/SessionFactoryImpl.cs

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

0 commit comments

Comments
 (0)