Skip to content

全局配置,插入实体对象时忽略属性值为null的字段 #2018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
BigUint64Array opened this issue Apr 26, 2025 · 3 comments
Open

Comments

@BigUint64Array
Copy link

Feature 特性

全局配置,插入实体对象时忽略属性值为null的字段

// c# code

简要描述原因

// c# code

使用场景

// c# code
@2881099
Copy link
Collaborator

2881099 commented Apr 27, 2025

fsql.Update<T>().SetSourceIgnore(item, val => val != null).ToSql();

@BigUint64Array
Copy link
Author

fsql.Update().SetSourceIgnore(item, val => val != null).ToSql();

这种方法每次都要设置条件,怎么开启全局生效

@2881099
Copy link
Collaborator

2881099 commented Apr 27, 2025

这个暂时做不了全局,或者你在aop sqs执行之前正则替换一下?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants