Skip to content

Commit 5940900

Browse files
committed
Remove usage of ISessionImplementor obsolete members
1 parent 98604a3 commit 5940900

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

releasenotes.txt

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Build vNext
1818
* Removed Classic HQL Parser.
1919
* Removed IQueryTranslatorFactory2. It's methods were pulled up to IQueryTranslatorFactory. Method CreateQueryTranslators assepting string as first argument marked as Obsolete.
2020
* IQueryExpression.Translate now has second boolean argument 'filter'
21+
* Added several methods which accepts IQueryExpression to ISessionImplementor, which is duplicating methods which accepts string.
2122

2223
Build 3.3.2.GA
2324
=============================

src/NHibernate/Engine/ISessionImplementor.cs

+2
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ public interface ISessionImplementor
100100
[Obsolete("Use overload with IQueryExpression")]
101101
void List(string query, QueryParameters parameters, IList results);
102102

103+
void List(IQueryExpression queryExpression, QueryParameters queryParameters, IList results);
104+
103105
/// <summary>
104106
/// Strongly-typed version of <see cref="List(string,QueryParameters)" />
105107
/// </summary>

src/NHibernate/Impl/AbstractSessionImpl.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public virtual IList List(string query, QueryParameters parameters)
103103
using (new SessionIdLoggingContext(SessionId))
104104
{
105105
var results = new List<object>();
106-
List(query, parameters, results);
106+
List(query.ToQueryExpression(), parameters, results);
107107
return results;
108108
}
109109
}
@@ -119,7 +119,7 @@ public virtual IList<T> List<T>(string query, QueryParameters queryParameters)
119119
using (new SessionIdLoggingContext(SessionId))
120120
{
121121
var results = new List<T>();
122-
List(query, queryParameters, results);
122+
List(query.ToQueryExpression(), queryParameters, results);
123123
return results;
124124
}
125125
}

src/NHibernate/Impl/QueryImpl.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Linq;
44
using NHibernate.Engine;
55
using NHibernate.Engine.Query;
6+
using NHibernate.Hql;
67

78
namespace NHibernate.Impl
89
{
@@ -77,7 +78,7 @@ public override void List(IList results)
7778
Before();
7879
try
7980
{
80-
Session.List(ExpandParameterLists(namedParams), GetQueryParameters(namedParams), results);
81+
Session.List(ExpandParameterLists(namedParams).ToQueryExpression(), GetQueryParameters(namedParams), results);
8182
}
8283
finally
8384
{

0 commit comments

Comments
 (0)