mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 01:58:13 +08:00
4.2.1.8 SqlFunc.GetSelfAndAutoFill BUG
This commit is contained in:
@@ -106,6 +106,9 @@ namespace OrmTest.UnitTest
|
||||
.Select(it => new { it.Id, it.Name,x=it.Id }).ToSql();
|
||||
base.Check("SELECT [ID] AS [Id] , [Name] AS [Name] , [ID] AS [x] FROM [STudent] WHERE [Id] IN (@InPara0) ", new List<SugarParameter>() {
|
||||
new SugarParameter("@InPara0",1) },t9.Key,t9.Value, "single t9 error");
|
||||
|
||||
var t10 = db.Queryable<Student>().Select(it => new StudentEnum() { Id = SqlFunc.GetSelfAndAutoFill(it.Id) }).ToSql();
|
||||
base.Check("SELECT * FROM [STudent] ", null, t10.Key, t10.Value, "single t10 error");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -179,7 +179,7 @@ namespace SqlSugar
|
||||
}
|
||||
public virtual string GetAsString(string asName, string fieldValue)
|
||||
{
|
||||
if (fieldValue.Contains(".*")) return fieldValue;
|
||||
if (fieldValue.Contains(".*")|| fieldValue=="*") return fieldValue;
|
||||
return string.Format(" {0} {1} {2} ", GetTranslationColumnName(fieldValue), "AS", GetTranslationColumnName(asName));
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ namespace SqlSugar
|
||||
|
||||
public virtual string GetAsString(string asName, string fieldValue, string fieldShortName)
|
||||
{
|
||||
if (fieldValue.Contains(".*")) return fieldValue;
|
||||
if (fieldValue.Contains(".*") || fieldValue == "*") return fieldValue;
|
||||
return string.Format(" {0} {1} {2} ", GetTranslationColumnName(fieldShortName + "." + fieldValue), "AS", GetTranslationColumnName(asName));
|
||||
}
|
||||
public virtual void Clear()
|
||||
|
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("4.2.1.7")]
|
||||
[assembly: AssemblyFileVersion("4.2.1.7")]
|
||||
[assembly: AssemblyVersion("4.2.1.8")]
|
||||
[assembly: AssemblyFileVersion("4.2.1.8")]
|
||||
|
Reference in New Issue
Block a user