Skip to content

Commit 086bd64

Browse files
committed
AddCriteriaAliases -> AddAliases
1 parent 19fdf99 commit 086bd64

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

src/NHibernate.Test/Async/Criteria/CriteriaQueryTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ public async Task TestSQLProjectionWithAliasesAsync()
972972
var subquery = QueryOver.Of(() => studentSubquery)
973973
.And(
974974
Restrictions.Sql("{e}.studentId = 667 and {studentSubquery}.studentId = 667")
975-
.AddCriteriaAliases("e", "studentSubquery")).Select(Projections.Id());
975+
.AddAliases("e", "studentSubquery")).Select(Projections.Id());
976976

977977
var uniqueResult = await (s.CreateCriteria(typeof(Student))
978978
.Add(Subqueries.Exists(subquery.DetachedCriteria))
@@ -993,7 +993,7 @@ public async Task TestSQLProjectionWithAliasesAsync()
993993
TypeFactory.HeuristicType(typeof(short)),
994994
TypeFactory.HeuristicType(typeof(string)),
995995
TypeFactory.HeuristicType(typeof(string)),
996-
}).AddCriteriaAliases("e", "c"))
996+
}).AddAliases("e", "c"))
997997
.UniqueResultAsync());
998998

999999
Assert.That(uniqueResult, Is.Not.Null);

src/NHibernate.Test/Criteria/CriteriaQueryTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ public void TestSQLProjectionWithAliases()
10691069
var subquery = QueryOver.Of(() => studentSubquery)
10701070
.And(
10711071
Restrictions.Sql("{e}.studentId = 667 and {studentSubquery}.studentId = 667")
1072-
.AddCriteriaAliases("e", "studentSubquery")).Select(Projections.Id());
1072+
.AddAliases("e", "studentSubquery")).Select(Projections.Id());
10731073

10741074
var uniqueResult = s.CreateCriteria(typeof(Student))
10751075
.Add(Subqueries.Exists(subquery.DetachedCriteria))
@@ -1090,7 +1090,7 @@ public void TestSQLProjectionWithAliases()
10901090
TypeFactory.HeuristicType(typeof(short)),
10911091
TypeFactory.HeuristicType(typeof(string)),
10921092
TypeFactory.HeuristicType(typeof(string)),
1093-
}).AddCriteriaAliases("e", "c"))
1093+
}).AddAliases("e", "c"))
10941094
.UniqueResult();
10951095

10961096
Assert.That(uniqueResult, Is.Not.Null);

src/NHibernate/Criterion/Projections.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public static AggregateProjection Sum(IProjection projection)
216216
/// <summary>
217217
/// A SQL projection, a typed select clause fragment.
218218
/// The string {alias} will be replaced by the alias of the root entity.
219-
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddCriteriaAliases("a", "bc")
219+
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddAliases("a", "bc")
220220
/// </summary>
221221
public static SQLProjection Sql(string sql, string[] columnAliases, IType[] types)
222222
{
@@ -226,7 +226,7 @@ public static SQLProjection Sql(string sql, string[] columnAliases, IType[] type
226226
/// <summary>
227227
/// A grouping SQL projection, specifying both select clause and group by clause fragments
228228
/// The string {alias} will be replaced by the alias of the root entity.
229-
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddCriteriaAliases("a", "bc")
229+
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddAliases("a", "bc")
230230
/// </summary>
231231
public static SQLProjection Sql(string sql, string groupBy, string[] columnAliases, IType[] types)
232232
{

src/NHibernate/Criterion/Restrictions.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ public static LambdaRestrictionBuilder On(Expression<Func<object>> expression)
801801
/// <summary>
802802
/// Apply a constraint expressed in SQL, with the given SQL parameters
803803
/// The string {alias} will be replaced by the alias of the root entity.
804-
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddCriteriaAliases("a", "bc")
804+
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddAliases("a", "bc")
805805
/// </summary>
806806
/// <param name="sql"></param>
807807
/// <param name="values"></param>
@@ -815,7 +815,7 @@ public static SQLCriterion Sql(SqlString sql, object[] values, IType[] types)
815815
/// <summary>
816816
/// Apply a constraint expressed in SQL, with the given SQL parameter
817817
/// The string {alias} will be replaced by the alias of the root entity.
818-
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddCriteriaAliases("a", "bc")
818+
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddAliases("a", "bc")
819819
/// </summary>
820820
/// <param name="sql"></param>
821821
/// <param name="value"></param>
@@ -829,7 +829,7 @@ public static SQLCriterion Sql(SqlString sql, object value, IType type)
829829
/// <summary>
830830
/// Apply a constraint expressed in SQL, with the given SQL parameter
831831
/// The string {alias} will be replaced by the alias of the root entity.
832-
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddCriteriaAliases("a", "bc")
832+
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddAliases("a", "bc")
833833
/// </summary>
834834
public static SQLCriterion Sql(string sql, object value, IType type)
835835
{
@@ -839,7 +839,7 @@ public static SQLCriterion Sql(string sql, object value, IType type)
839839
/// <summary>
840840
/// Apply a constraint expressed in SQL, with the given SQL parameter
841841
/// The string {alias} will be replaced by the alias of the root entity.
842-
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddCriteriaAliases("a", "bc")
842+
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddAliases("a", "bc")
843843
/// </summary>
844844
public static SQLCriterion Sql(string sql, object[] values, IType[] types)
845845
{
@@ -849,7 +849,7 @@ public static SQLCriterion Sql(string sql, object[] values, IType[] types)
849849
/// <summary>
850850
/// Apply a constraint expressed in SQL
851851
/// The string {alias} will be replaced by the alias of the root entity.
852-
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddCriteriaAliases("a", "bc")
852+
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddAliases("a", "bc")
853853
/// </summary>
854854
/// <param name="sql"></param>
855855
/// <returns></returns>
@@ -861,7 +861,7 @@ public static SQLCriterion Sql(SqlString sql)
861861
/// <summary>
862862
/// Apply a constraint expressed in SQL
863863
/// The string {alias} will be replaced by the alias of the root entity.
864-
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddCriteriaAliases("a", "bc")
864+
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddAliases("a", "bc")
865865
/// </summary>
866866
/// <param name="sql"></param>
867867
/// <returns></returns>

src/NHibernate/Criterion/SQLCriterion.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace NHibernate.Criterion
1010
/// <summary>
1111
/// An <see cref="ICriterion"/> that creates a SQLExpression.
1212
/// The string {alias} will be replaced by the alias of the root entity.
13-
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddCriteriaAliases("a", "bc")
13+
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddAliases("a", "bc")
1414
/// </summary>
1515
/// <remarks>
1616
/// This allows for database specific Expressions at the cost of needing to
@@ -67,7 +67,7 @@ public override string ToString()
6767
/// Provide list of criteria aliases that's used in SQL projection.
6868
/// To be replaced with SQL aliases.
6969
/// </summary>
70-
public SQLCriterion AddCriteriaAliases(params string[] criteriaAliases)
70+
public SQLCriterion AddAliases(params string[] criteriaAliases)
7171
{
7272
if(_criteriaAliases == null)
7373
_criteriaAliases = new List<string>();

src/NHibernate/Criterion/SQLProjection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace NHibernate.Criterion
99

1010
/// <summary>
1111
/// A SQL fragment. The string {alias} will be replaced by the alias of the root entity.
12-
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddCriteriaAliases("a", "bc")
12+
/// Criteria aliases can also be used: "{a}.Value + {bc}.Value". Such aliases need to be registered via call to AddAliases("a", "bc")
1313
/// </summary>
1414
[Serializable]
1515
public sealed class SQLProjection : IProjection
@@ -46,7 +46,7 @@ public SqlString ToSqlString(ICriteria criteria, int loc, ICriteriaQuery criteri
4646
/// Provide list of criteria aliases that's used in SQL projection.
4747
/// To be replaced with SQL aliases.
4848
/// </summary>
49-
public SQLProjection AddCriteriaAliases(params string[] criteriaAliases)
49+
public SQLProjection AddAliases(params string[] criteriaAliases)
5050
{
5151
if(_criteriaAliases == null)
5252
_criteriaAliases = new List<string>();

0 commit comments

Comments
 (0)