DotNetNext / SqlSugar

.Net aot ORM Fastest ORM Simple Easy VB.NET Sqlite orm Oracle ORM Mysql Orm 虚谷数据库 postgresql ORm SqlServer oRm 达梦 ORM 人大金仓 ORM 神通ORM C# ORM , C# ORM .NET ORM NET5 ORM .NET6 ORM ClickHouse orm QuestDb ,TDengine ORM,OceanBase orm,GaussDB orm ,Tidb orm Object/Relational Mapping
https://www.donet5.com/Home/Doc
MIT License
5.35k stars 1.34k forks source link

DbColumnInfo里没是否虚拟列的判断吗? #971

Closed jiushi97 closed 2 years ago

jiushi97 commented 2 years ago

需要根据这个判断来给实体加上IsOnlyIgnoreInsert = true,IsOnlyIgnoreUpdate = true

DotNetNext commented 2 years ago

IsIgnore 就是虚拟列

DotNetNext commented 2 years ago

IsOnlyIgnoreInsert = true,IsOnlyIgnoreUpdate = true 这2个是更新和插入 的忽略

jiushi97 commented 2 years ago

我是需要这样 if(DbColumnInfo.IsVirtual){ 自己写的实体生成.Append("[SugarColumn(IsOnlyIgnoreInsert =true,IsOnlyIgnoreUpdate =true)]"); } 但是没有这个判断,目前是在ColumnDescription里加了关键字来生成的: if(DbColumnInfo.ColumnDescription.Contains("Virtual")){ 自己写的实体生成.Append("[SugarColumn(IsOnlyIgnoreInsert =true,IsOnlyIgnoreUpdate =true)]"); }

DotNetNext commented 2 years ago

DbFirst肯定不行