mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
- 修复 3.2.665-3.2.680 子查询的特殊 bug;
This commit is contained in:
parent
3e5e84f83c
commit
588320dbfb
@ -436,6 +436,46 @@ namespace base_entity
|
||||
Math.PI
|
||||
});
|
||||
|
||||
var usergroupRepository = fsql.GetAggregateRootRepository<UserGroup>();
|
||||
usergroupRepository.Delete(a => true);
|
||||
usergroupRepository.Insert(new[]{
|
||||
new UserGroup
|
||||
{
|
||||
CreateTime = DateTime.Now,
|
||||
GroupName = "group1",
|
||||
UpdateTime = DateTime.Now,
|
||||
Sort = 1,
|
||||
User1s = new List<User1>
|
||||
{
|
||||
new User1 { Nickname = "nickname11", Username = "username11", Description = "desc11" },
|
||||
new User1 { Nickname = "nickname12", Username = "username12", Description = "desc12" },
|
||||
new User1 { Nickname = "nickname13", Username = "username13", Description = "desc13" },
|
||||
}
|
||||
},
|
||||
new UserGroup
|
||||
{
|
||||
CreateTime = DateTime.Now,
|
||||
GroupName = "group2",
|
||||
UpdateTime = DateTime.Now,
|
||||
Sort = 2,
|
||||
User1s = new List<User1>
|
||||
{
|
||||
new User1 { Nickname = "nickname21", Username = "username21", Description = "desc21" },
|
||||
new User1 { Nickname = "nickname22", Username = "username22", Description = "desc22" },
|
||||
new User1 { Nickname = "nickname23", Username = "username23", Description = "desc23" },
|
||||
}
|
||||
},
|
||||
});
|
||||
var userRepository = fsql.GetAggregateRootRepository<User1>();
|
||||
|
||||
var testsublist1 = fsql.Select<UserGroup>()
|
||||
.First(a => new
|
||||
{
|
||||
a.Id,
|
||||
list = userRepository.Select.Where(b => b.GroupId == a.Id).ToList(),
|
||||
list2 = userRepository.Select.Where(b => b.GroupId == a.Id).ToList(b => b.Nickname),
|
||||
});
|
||||
|
||||
|
||||
Dictionary<string, object> dic = new Dictionary<string, object>();
|
||||
dic.Add("id", 1);
|
||||
|
@ -17,6 +17,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Extensions\FreeSql.Extensions.AggregateRoot\FreeSql.Extensions.AggregateRoot.csproj" />
|
||||
<ProjectReference Include="..\..\Extensions\FreeSql.Extensions.BaseEntity\FreeSql.Extensions.BaseEntity.csproj" />
|
||||
<ProjectReference Include="..\..\Extensions\FreeSql.Extensions.JsonMap\FreeSql.Extensions.JsonMap.csproj" />
|
||||
<ProjectReference Include="..\..\Extensions\FreeSql.Extensions.LazyLoading\FreeSql.Extensions.LazyLoading.csproj" />
|
||||
|
@ -81,6 +81,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FreeSql.Provider.OracleOled
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "aspnetcore_transaction", "Examples\aspnetcore_transaction\aspnetcore_transaction.csproj", "{28163C3B-B2E6-432D-AAC3-F5F19374BE31}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FreeSql.Extensions.AggregateRoot", "Extensions\FreeSql.Extensions.AggregateRoot\FreeSql.Extensions.AggregateRoot.csproj", "{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -439,6 +441,18 @@ Global
|
||||
{28163C3B-B2E6-432D-AAC3-F5F19374BE31}.Release|x64.Build.0 = Release|Any CPU
|
||||
{28163C3B-B2E6-432D-AAC3-F5F19374BE31}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{28163C3B-B2E6-432D-AAC3-F5F19374BE31}.Release|x86.Build.0 = Release|Any CPU
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}.Release|x64.Build.0 = Release|Any CPU
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -469,10 +483,11 @@ Global
|
||||
{9D82A683-2950-4E8A-B078-A422ECA6AAA5} = {94C8A78D-AA15-47B2-A348-530CD86BFC1B}
|
||||
{19D2E22A-B000-46B6-AFC8-60BF01A51C9A} = {2A381C57-2697-427B-9F10-55DA11FD02E4}
|
||||
{28163C3B-B2E6-432D-AAC3-F5F19374BE31} = {94C8A78D-AA15-47B2-A348-530CD86BFC1B}
|
||||
{5C78C4CE-3CDC-49C3-AF34-556567B95F2A} = {4A92E8A6-9A6D-41A1-9CDA-DE10899648AA}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {089687FA-5D21-40AC-BA8A-AA0D1E1H7F98}
|
||||
RESX_PrefixTranslations = True
|
||||
RESX_NeutralResourcesLanguage = en-US
|
||||
RESX_PrefixTranslations = True
|
||||
SolutionGuid = {089687FA-5D21-40AC-BA8A-AA0D1E1H7F98}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -22,8 +22,12 @@ public static partial class FreeSqlGlobalExtensions
|
||||
{
|
||||
#if net40
|
||||
#else
|
||||
static readonly Lazy<PropertyInfo> _TaskReflectionResultPropertyLazy = new Lazy<PropertyInfo>(() => typeof(Task).GetProperty("Result"));
|
||||
internal static object GetTaskReflectionResult(this Task task) => _TaskReflectionResultPropertyLazy.Value.GetValue(task, new object[0]);
|
||||
internal static object GetTaskReflectionResult(this Task task)
|
||||
{
|
||||
var propResult = task?.GetType().GetProperty("Result");
|
||||
if (propResult != null) return propResult.GetValue(task, new object[0]);
|
||||
return null;
|
||||
}
|
||||
#endif
|
||||
|
||||
#region Type 对象扩展方法
|
||||
|
Loading…
x
Reference in New Issue
Block a user