Skip to content

Commit

Permalink
带分表策略的实体类,在CheckTable时也不要做反向工程检查
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Oct 20, 2024
1 parent cfe2894 commit 5b90edb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion XCode/Entity/EntitySession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,11 @@ private void CheckTable()
// 克隆一份,防止修改
table = (table.Clone() as IDataTable)!;

if (/*table != null &&*/ table.TableName != TableName)
// 带有分表策略的实体类不参与反向工程
if (Factory.ShardPolicy != null) return;
if (table.Columns.Any(e => e.DataScale.StartsWithIgnoreCase("shard:", "timeShard:"))) return;

if (table.TableName != TableName)
{
// 表名去掉前缀
var name = TableName;
Expand Down
Binary file modified XCode/Membership/xcodetool.exe
Binary file not shown.

0 comments on commit 5b90edb

Please sign in to comment.