mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-12-14 07:15:47 +08:00
## v0.5.3
- 增加 ISelect.ToList(true) 自动贪婪加载 LeftJoin/InnerJoin/RightJoin 导航数据;#35 - 增加 IAdo.Query<T1, T2 ...> 多结果集查询; - 增加 IAdo.ExecuteDataSet 多结果集查询; - 优化 未设置实体属性 set 的将被自动过滤 IsIgnore;
This commit is contained in:
@@ -48,13 +48,14 @@ namespace FreeSql.Internal {
|
||||
var propsLazy = new List<(PropertyInfo, bool, bool)>();
|
||||
var propsNavObjs = new List<PropertyInfo>();
|
||||
foreach (var p in trytb.Properties.Values) {
|
||||
var setMethod = trytb.Type.GetMethod($"set_{p.Name}");
|
||||
var tp = common.CodeFirst.GetDbInfo(p.PropertyType);
|
||||
//if (tp == null) continue;
|
||||
var colattr = common.GetEntityColumnAttribute(entity, p);
|
||||
if (tp == null && colattr == null) {
|
||||
if (common.CodeFirst.IsLazyLoading) {
|
||||
var getIsVirtual = trytb.Type.GetMethod($"get_{p.Name}")?.IsVirtual;
|
||||
var setIsVirtual = trytb.Type.GetMethod($"set_{p.Name}")?.IsVirtual;
|
||||
var setIsVirtual = setMethod?.IsVirtual;
|
||||
if (getIsVirtual == true || setIsVirtual == true)
|
||||
propsLazy.Add((p, getIsVirtual == true, setIsVirtual == true));
|
||||
}
|
||||
@@ -96,6 +97,7 @@ namespace FreeSql.Internal {
|
||||
colattr.DbDefautValue = Activator.CreateInstance(p.PropertyType.IsNullableType() ? p.PropertyType.GenericTypeArguments.FirstOrDefault() : p.PropertyType);
|
||||
if (colattr.IsIdentity == true && p.PropertyType.IsNumberType() == false)
|
||||
colattr.IsIdentity = false;
|
||||
if (setMethod == null) colattr.IsIgnore = true;
|
||||
|
||||
var col = new ColumnInfo {
|
||||
Table = trytb,
|
||||
|
||||
Reference in New Issue
Block a user