增加支持在ResultMap中使用连续属性访问对结果集对象中的嵌套属性赋值;#255
Merged
xiangxiren merged 3 commits intodotnetcore:masterfrom Dec 9, 2025
Merged
Conversation
nbut-xzy
commented
Dec 5, 2025
Contributor
Author
nbut-xzy
left a comment
There was a problem hiding this comment.
代码文件的字符编码从GBK修正为UTF-8;
xiangxiren
reviewed
Dec 9, 2025
Collaborator
There was a problem hiding this comment.
注释乱码。同时,建议去掉里面的中英文混合注释,还有类似这样的示例注释(例如 User.Address.City)
| /// Gets the final property in the chain (��ȡ�����������һ������) | ||
| /// Note: Setter is explicitly disabled for immutability (Setter ����ʽ�����Ա�֤���ɱ���) | ||
| /// </summary> | ||
| public PropertyInfo Property { get => property; set => throw new NotSupportedException(); } |
Collaborator
There was a problem hiding this comment.
Property为何不直接定义为只读。PropertyInfo Property { get; }
| { | ||
| internal interface IPropertyHolder | ||
| { | ||
| PropertyInfo Property { get; set; } |
Collaborator
There was a problem hiding this comment.
建议 PropertyInfo Property { get; }
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
功能改进 / Feature Enhancements
新增核心接口与实现 / Added Core Interface and Implementations
IPropertyHolder接口,统一属性访问逻辑Added
IPropertyHolderinterface to unify property access logicPropertyHolder类继承自IPropertyHolderModified
PropertyHolderto inherit fromIPropertyHolderPropertyChainHolder类实现嵌套属性链支持Added
PropertyChainHolderclass to support nested property chains嵌套属性映射支持 / Nested Property Mapping Support
EntityDeserializer.ResolveProperty方法,支持解析如NestedProp1.NestedProp2的连续属性路径Modified
EntityDeserializer.ResolvePropertyto resolve chained property paths (e.g.,NestedProp1.NestedProp2)EntityDeserializer.CreateDeserialize方法,自动初始化空嵌套对象Modified
EntityDeserializer.CreateDeserializeto auto-initialize null nested objects测试覆盖 / Testing
Added unit tests for nested property mapping
Validated multi-level object initialization and data integrity
影响范围 / Impact
IPropertyHolder.cs,PropertyHolder.cs,PropertyChainHolder.cs,EntityDeserializer.csEntityDeserializerTest.cs,AllPrimitive.xml,NestedEntity.cs示例场景 / Example Usage